arXiv:2609.10634cs.CRSep 2026

Manuscript Offprint

arXiv:2609.10634

HermiCache: Enclave-Aware Cache Replacement for Trusted Execution Environments

Oussama Elmnaouri, Pascal Cotret, Vianney Lapôtre, Loïc Lagadec

Oussama Elmnaouri*, Pascal Cotret*, Vianney Lapôtre†, Loïc Lagadec*

  • Lab-STICC, UMR CNRS 6285, ENSTA (29806 Brest Cedex 9, France)

firstname.lastname@ensta.fr

†^{\dagger} Lab-STICC, UMR CNRS 6285, Université Bretagne-Sud (56100 Lorient, France)

vianney.lapotre@univ-ubs.fr

Abstract—Trusted Execution Environments (TEEs) protect enclave memory from untrusted software but remain vulnerable to cache-based side-channel attacks due to shared microarchitectural resources. Existing countermeasures use techniques such as cache partitioning or randomization: these solutions are not ideal if a designer wants fine-grained configurations and a deterministic protection. In this paper, we introduce HermiCache which is an answer to these requirements. HermiCache is designed for RISC-V cores and has been implemented in the OpenHwGroup CVA6 core with a Keystone TEE for the software layer. The solution has an area overhead of 6% on the processor core.

Index Terms—Hardware security, side-channel attacks, Trusted Execution Environments, RISC-V.

I. INTRODUCTION

Trusted Execution Environments (TEEs) ensure that sensitive code and data are processed in enclaves which isolate it from untrusted software. Processor architectures usually have one or more TEEs available: Intel SGX [1], ARM TrustZone [2], and AMD SEV [3]. For the open-source RISC-V architecture, Keystone [4] and Penglai [5] are two possible solutions.

TEEs do not only rely on software components, it also implies that hardware mechanisms which microarchitecture can leak information. When using shared caches, timing side-channel attacks such as Evict+Time or Prime+Probe [6] can be used to retrieve information from the victim. Existing defenses can be software-based or hardware-based, but both engender important tradeoffs: techniques such as constant-time programming are difficult to use with complex applications while hardware partitioning or randomization implies a non-optimized capacity and additional logic to manage the cache replacement policy.

This paper introduces HermiCache, a hardware-enforced isolation for TEEs resistant to cache-based side-channel attacks. The contributions are as follows:

• Ownership-based replacement mechanism.

• RTL implementation in a RISC-V CVA6 core with a Keystone TEE integration.

• Quantitative evaluation through FPGA synthesis and gem5 simulations.

This work was carried out within the SCAMA project (ANR-23-CE39-0011), funded by the French National Research Agency (ANR).