arXiv:2608.13496cs.ARAug 2026

Manuscript Offprint

arXiv:2608.13496

YAVIN: A Unified Architecture for Secure Edge Processing in Memory

Shouzhi Fang, William C. Tegge, Md Omar Faruque, Peipei Zhou, Endadul Hoque, Alex K. Jones

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Secure, private multi-tenant execution spanning processors, memory, and accelerators remains one of the most significant challenges in modern edge computing systems. Simultaneously, processing-in-memory (PIM) has emerged as an effective approach for reducing the von Neumann bottleneck by moving computation closer to data. Existing trusted execution environments (TEEs) establish trust only within the processor, protecting data while it traverses untrusted resources such as the memory bus. Consequently, trusted computation cannot be performed directly within memory. At the opposite extreme, fully homomorphic encryption enables computation on encrypted data but remains impractical for these multi-tenant systems because of its substantial performance and storage overheads. We present YAVIN, a unified trusted computing base (TCB) that extends the trusted execution environment beyond the processor to encompass both processor execution and a dedicated memory region supporting trusted processing-in-memory execution while treating the memory bus as untrusted. Leveraging the dedicated protected memory regions already established by conventional TEE architectures, YAVIN enables data to be decrypted, processed, and re-encrypted by either processor or PIM execution while remaining within the trusted execution environment, without exposing plaintext on the shared memory bus. To realize this unified TCB, YAVIN presents the first PIM implementations of the LightSaber post-quantum public-key cryptosystem and ASCON-128 authenticated encryption, co-designing both algorithms for efficient DRAM execution to establish and maintain shared cryptographic state, provide authenticated communication over an untrusted memory bus, and support trusted execution spanning the processor and memory. Finally, we demonstrate how cryptography-PIM co-design for tensor-based workloads reorganizes computation to satisfy the ordering constraints imposed by authenticated encryption with minimal performance overhead while simultaneously enabling bit-sliced ordering that limits temporary plaintext exposure. Compared to the latest PIM AES implementation, YAVIN achieves more than a 20×\times speedup while incurring only 34% and 9.3% overhead when executing INT8 and INT32 quantized edge-class LLMs, respectively, relative to plaintext execution.

I Introduction

Distributed computing infrastructures spanning cloud and edge systems have become the dominant platform for computationally intensive workloads, including machine learning, computer vision, scientific computing, and AI inference. To maximize resource utilization, these systems increasingly rely on multi-tenant execution, where multiple users share processors, accelerators, and memory resources while maintaining logical isolation. Emerging Processing-in-Memory (PIM) architectures further improve efficiency by moving computation closer to data, substantially reducing the performance and energy costs associated with data movement. However, these deployments also introduce significant security challenges. Client data and cryptographic material are processed on infrastructure that may be physically accessible, remotely administered, or shared with untrusted tenants, while operating systems, hypervisors, communication channels, and shared hardware resources remain potential attack surfaces capable of exposing sensitive information through software, microarchitectural, or physical attacks [1, 2, 3].

Protecting sensitive computation in these environments remains a fundamental challenge. Existing approaches generally fall into two categories. Trusted Execution Environments (TEEs), such as Intel SGX[4], AMD SEV[5], and ARM CCA[6], protect computation by isolating trusted software execution from an untrusted operating system and hypervisor while encrypting memory outside the trusted boundary. Although highly efficient, these approaches fundamentally assume a processor-centric execution model in which computation occurs after complete plaintext operands have been reconstructed within the trusted processor. At the opposite extreme, Fully Homomorphic Encryption (FHE) enables computation directly on encrypted data, eliminating the need to expose plaintext during execution [7]. However, these strong confidentiality guarantees come at the cost of several orders of magnitude higher computational complexity, substantially increased memory capacity requirements, and high energy consumption. These overheads are challenging even in cloud datacenters, let alone on edge computing platforms where compute capability, memory capacity, and energy budgets are inherently constrained. Consequently, neither conventional processor-centric TEEs nor FHE adequately address the security requirements of emerging PIM architectures, motivating a distributed trusted execution model that spans both processors and memory-resident computation.

In addition to introducing new security challenges, DRAM-based PIM [8, 9, 10, 11, 12, 13] fundamentally changes how data and computation are organized to achieve high performance through massive parallelism. PIM implementations rely on bit-sliced data representations, structured data movement, and application-specific execution order. In contrast, the execution model assumed by conventional cryptographic algorithms and processor-centric trusted execution environments (TEEs) differs fundamentally from that of efficient PIM implementations. Furthermore, learning-based inference has emerged as the dominant computational workload for edge platforms, including large language models (LLMs), vision transformers, multimodal AI, and related applications. Efficient execution of these workloads on edge platforms, including PIM architectures, further requires tensor reorganization, data quantization, and carefully orchestrated data movement to minimize memory traffic. Reconciling the conflicting requirements of efficient PIM execution, conventional secure execution, and learning-oriented data organization presents a significant challenge. Thus, efficient secure execution on PIM-based edge systems requires the co-design of cryptographic protection, trusted execution, data organization, and learning-oriented computation.

Fig. 1: YAVIN unified processor, in-memory, trusted execution environment

In this paper we present YAVIN, or A Unified Architecture for Secure Edge Processing in Memory. YAVIN creates a distributed TEE that enables cooperative execution between processor- and memory-resident trusted execution environments. The YAVIN concept is illustrated in Fig. 1. Each tenant of the system can establish a TEE that spans both the processor and the memory system. The memory bus is considered a shared and untrusted resource. Each tenant’s TEE is provided with physically isolated trusted memory space as is common within existing TEEs. YAVIN provides the capability to allow in-memory computation on this area. To establish cooperative operation in the TEE, YAVIN uses the LightSaber post-quantum key encapsulation mechanism (KEM) [14] to establish trusted communication of a shared secret between the processor and the memory system.

Both the CPU and memory (using PIM execution) generate independent LightSaber public/private key pairs, establishing the trust foundation for the unified trusted computing base (TCB). The memory-side key pair is derived from a DRAM physically unclonable function (PUF) [15], providing a hardware root of trust. The resulting shared secret becomes the symmetric key used to protect communication between the processor and memory within the TCB. YAVIN further extends the key establishment protocol with a lightweight authentication mechanism that securely supports key initialization and subsequent key updates.

YAVIN uses the Ascon authenticated encryption with associated data (AEAD) standard [16] due to its suitability for PIM implementation and its built-in authentication capability. Both the CPU and memory can decrypt data, performs computation on plaintext data, and immediately re-encrypt the results locally, ensuring that plaintext data never traverses the untrusted memory bus. YAVIN provides PIM optimized realizations of both LightSaber and Ascon-AEAD to provide approximately 128-bit security while relying on computational primitives that map efficiently to DRAM-based PIM execution. In addition to the efficiency benefits of Ascon-AEAD over the more standard AES crytography standard and the existing in-memory blockcipher designs [17], Ascon-AEAD provides authentication in addition to cryptography.

As part of its authentication design, Ascon-AEAD requires encryption and decryption to occur in a well-defined order. Rather than treating this as a limitation, YAVIN exploits the inherent flexibility across two different scheduling dimensions: the order in which tensor indices are evaluated and the order in which bit-level computations are performed. Tensor index scheduling organizes computation into efficient encryption and decryption streams, while bit-level scheduling limits the amount of plaintext simultaneously exposed during execution. For many tensor computations, the order in which independent tensor indices are evaluated may be changed without affecting the final result. YAVIN exploits this flexibility to organize computation into continuous encryption and decryption streams.

PIM execution inherently operates on plaintext data. Accordingly, our threat model assumes that the TCB includes a private region of memory in which data may be decrypted, processed, and re-encrypted. Outside this protected execution region, data remains encrypted. However, to further reduce plaintext exposure, YAVIN exploits the flexibility in execution order, particularly by scheduling bit-level computation. As a result, complete plaintext values are never simultaneously exposed during execution. Instead, only the subset of bit slices required for the current stage of computation is materialized in plaintext, while the remaining bit slices remain encrypted. This reduces the information available from any transient observation of memory contents.

YAVIN makes the following contributions.

  • We present YAVIN, the first unified trusted execution environment that enables cooperative trusted execution between a host processor and charge-sharing DRAM-based processing-in-memory.
  • We demonstrate the feasibility of secure in-memory execution through detailed implementations of the LightSaber post-quantum key encapsulation mechanism (KEM) and Ascon-AEAD, providing approximately 128-bit security using cryptographic primitives well suited to bulk-bitwise DRAM execution.
  • We present the first in-DRAM authenticated encryption framework based on an AEAD primitive that integrates confidentiality and authentication tag generation directly within charge-sharing DRAM rather than relying on separate memory-controller, Direct Memory Access, or metadata-based authentication mechanisms.
  • We demonstrate that co-designing cryptography, data organization, and computation scheduling enables trusted PIM execution while minimizing plaintext exposure and cryptographic overhead.
  • We provide a detailed evaluation demonstrating the advantages of the proposed co-designed architecture over PIM implementations based on conventional AES- and ECC-based cryptographic schemes.

References (25)