Twine: An Embedded Trusted Runtime for WebAssembly

03/29/2021
by   Jämes Ménétrey, et al.
0

WebAssembly is an increasingly popular lightweight binary instruction format, which can be efficiently embedded and sandboxed. Languages like C, C++, Rust, Go, and many others can be compiled into WebAssembly. This paper describes Twine, a WebAssembly trusted runtime designed to execute unmodified, language-independent applications. We leverage Intel SGX to build the runtime environment without dealing with language-specific, complex APIs. While SGX hardware provides secure execution within the processor, Twine provides a secure, sandboxed software runtime nested within an SGX enclave, featuring a WebAssembly system interface (WASI) for compatibility with unmodified WebAssembly applications. We evaluate Twine with a large set of general-purpose benchmarks and real-world applications. In particular, we used Twine to implement a secure, trusted version of SQLite, a well-known full-fledged embeddable database. We believe that such a trusted database would be a reasonable component to build many larger application services. Our evaluation shows that SQLite can be fully executed inside an SGX enclave via WebAssembly and existing system interface, with similar average performance overheads. We estimate that the performance penalties measured are largely compensated by the additional security guarantees and its full compatibility with standard WebAssembly. An in-depth analysis of our results indicates that performance can be greatly improved by modifying some of the underlying libraries. We describe and implement one such modification in the paper, showing up to 4.1× speedup. Twine is open-source, available at GitHub along with instructions to reproduce our experiments.

READ FULL TEXT

page 1

page 8

research
06/17/2022

WaTZ: A Trusted WebAssembly Runtime Environment with Remote Attestation for TrustZone

WebAssembly (Wasm) is a novel low-level bytecode format that swiftly gai...
research
04/25/2019

Developing Secure Services for IoT with OP-TEE: A First Look at Performance and Usability

The implementation, deployment and testing of secure services for Intern...
research
05/01/2023

Montsalvat: Intel SGX Shielding for GraalVM Native Images

The popularity of the Java programming language has led to its wide adop...
research
03/29/2021

Dynamic Binary Translation for SGX Enclaves

Enclaves, such as those enabled by Intel SGX, offer a hardware primitive...
research
03/02/2022

ReZone: Disarming TrustZone with TEE Privilege Reduction

In TrustZone-assisted TEEs, the trusted OS has unrestricted access to bo...
research
07/10/2023

Towards Runtime Customizable Trusted Execution Environment on FPGA-SoC

Processing sensitive data and deploying well-designed Intellectual Prope...
research
04/27/2021

KEVLAR-TZ: A Secure Cache for ARM TrustZone

Edge devices are increasingly in charge of storing privacy-sensitive dat...

Please sign up or login with your details

Forgot password? Click here to reset