arXiv:2610.12050cs.CROct 2026

Manuscript Offprint

arXiv:2610.12050

Protecting CPU AI On Edge TEEs: WebAssembly's Promise and Practical Challenges

Friedrich Vandenberghe, Lachlan Gunn, Bruno Volckaert, Merlijn Sebrechts

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Friedrich Vandenberghe*, Lachlan Gunn†, Bruno Volckaert*, and Merlijn Sebrechts*

*IDLab, Department of Information Technology

Ghent University - imec, Belgium

friedrich.vandenberghe@ugent.be

† Aalto University, Finland

Abstract—AI models on edge hardware contain important intellectual property (IP), but an adversary can steal it when they achieve root access. Trusted Execution Environments (TEE) like Arm TrustZone protect against these Operating System (OS) level attacks. However, they are challenging to use. More precisely, it is difficult to run unaltered applications inside a TEE. This work presents a solution that allows the execution of unaltered AI models, compiled to WebAssembly, on the WebAssembly Micro Runtime (WAMR) in OP-TEE for Arm TrustZone. Additionally, this work provides an AI model distributor that encrypts the WebAssembly binary and places the encryption key in one of the device's fuses. This way, only the WAMR Trusted Application (TA) in OP-TEE can decrypt and execute the AI model. A thorough evaluation of our solution shows that it incurs an additional overhead of 22% in comparison to an application manually ported to OP-TEE, while also facilitating the execution of unaltered AI models with an additional inference latency of 6% without significant porting effort. Overall, there is a pressing need to safeguard the IP of AI models and this work shows that there is a real promise in WebAssembly, but there remain some practical challenges.

Index Terms—WebAssembly, Confidential Computing, Arm TrustZone, Computer Vision, Secure Edge.

I. INTRODUCTION

AI models on commercial, off-the-shelf edge hardware can contain important intellectual property (IP), but its software alone is limited in its ability to protect this IP from being extracted by an attacker. An adversary that achieves root access can extract all data from the device, including AI model weights. One way to protect the AI models is via a hardware-protected Trusted Execution Environment (TEE), but this brings its own challenges; as a TEE like Arm TrustZone [1], [2] provides a very constrained environment for developers [3], providing an experience more akin to an embedded platform. Thus, developers cannot simply recompile existing applications to run inside TEE. Most environments only provide a limited variant of the C standard library, and lack support for Linux system calls. As a result, executing AI models within a TEE requires significant porting effort and specialized expertise, and must be repeated for each TEE platform. There is thus a pressing need for a mechanism to run existing AI software inside edge TEEs such as Arm TrustZone without significant porting effort.

Figure

Fig. 1. The WebAssembly Micro Runtime (WAMR) allows unaltered AI applications to run inside an edge Trusted Execution Environment (TEE) such as OP-TEE for Arm TrustZone. Takeaway: The TEE ensures that an adversary on a compromised Operating System (OS) cannot exfiltrate the AI model, while WebAssembly negates the porting effort required to run the AI model inside the TEE.

While there exist some efforts that aim to already alleviate this porting effort, they are limited in their language support or their support for highly constrained devices. One is TREO [4], which runs an application written in the C programming language directly inside of the Arm TrustZone Secure World with few or no modifications. A downside to this is that it supports only applications written in C. PARTEE [5] is a recent effort that provides container-like partitions built on Arm TrustZone, but that is currently not yet open-source nor is it generally available. Alternatively, WebAssembly is a promising technology that also offers container-like environments, for example WaTZ [6] shows that it is possible to execute existing general applications inside of Arm TrustZone via the integration of a Wasm virtual machine. Yet, this integration did not deal with the execution of unaltered AI models. Furthermore, this integration also has some lacking traits that are blocking for easily executing AI models. For example, WaTZ uses a remote attestation protocol to release keys and confidential information to the TEE. This requires a connection with a trustworthy second party to initiate the AI model, which is incompatible with some use-cases where devices boot up without an internet connection. These existing efforts are examined in-depth in section III.

To answer the pressing need to safeguard the IP of AI models, we present a WebAssembly-based AI platform and model distribution methodology integrated with Arm TrustZone.

This platform makes use of the WebAssembly Micro Runtime [7] and is then evaluated using an NVIDIA Jetson AGX Orin. Our integration works fully offline and offers support for AI models compiled to the Open Neural Network Exchange (ONNX) [8] format. This way, we can easily port existing applications to run inside the TEE, thereby fulfilling the promise of protecting important AI model IP against adversaries with root access. Fig. 1 illustrates a conceptual overview. Some practical challenges do endure, e.g. opportunities remain in the current WebAssembly ecosystem to improve AI model support and the strict memory handling imposed by Arm TrustZone remain.

In this paper, we aim to provide an answer to the following RESEARCH QUESTIONS:

RQ1) How does WebAssembly perform as a way to recompile existing AI models for Arm TrustZone without any modifications?

RQ2) What is the performance overhead of the execution of WebAssembly-applications inside Arm TrustZone in comparison with native code?

RQ3) How have new developments in the WebAssembly Micro Runtime impacted the performance of WebAssembly in TEEs?

Moreover, our CONTRIBUTIONS to the state of the art are:

  1. A runtime to execute modern WebAssembly-based workloads inside of the Arm TrustZone Secure World.

  2. A demonstration of our solution applied to a computer vision use-case.

  3. Benchmarks measuring performance overhead relative to TEE-specific native code.

  4. A discussion on the limitations and future of WebAssembly for machine-learning tasks