arXiv:2611.00282cs.AROct 2026

Manuscript Offprint

arXiv:2611.00282

Randomized Caches in Hardware: Challenges and Trade-offs

Xinrui Wang, Pascal Kosak, Christof Paar, Daniel Genkin, Yuval Yarom, Anirban Chakraborty

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

Xinrui Wang*, Pascal Kosak*, Christof Paar†, Daniel Genkin‡, Yuval Yarom*, Anirban Chakraborty†

  • Ruhr University Bochum † Max Planck Institute for Security and Privacy ‡ Georgia Tech

Abstract—Multiple recent works propose randomized cache designs, that protect against side-channel attacks by obfuscating the mapping of memory addresses to cache locations. These designs typically specify the architectural behavior of the scheme, leaving the practical challenges of a concrete hardware implementation largely unexplored. Moreover, in the absence of hardware implementations, designers have to resort to architectural simulators for evaluating the design, introducing a further level of abstraction. To bridge the gap between the abstract designs and their concrete realization, we implement four prominent randomized cache designs—CEASER-S, SCATTERCACHE, SASS-CACHE and MIRAGE—and integrate them as the last-level cache (LLC) of a multi-core out-of-order RISC-V system-on-chip (SoC). We first identify multiple common challenges to implementation, as well as several design-specific ones, and develop practical solutions to overcome them. We then evaluate the resulting SoC variants through complete FPGA implementations on which we run the SPEC CPU 2017 rate and GAPBS workloads to completion, presenting, to our knowledge, the first comparative evaluation of these designs integrated into a common full-system hardware platform. Our findings indicate that pipelining the index derivation function (IDF), as suggested by past works, is not sufficient. In three of the four variants, the frequency bottleneck shifts to other aspects of the design, resulting in a frequency drop of up to 35% compared to the baseline set-associative cache. Redesigning the critical paths, while keeping each design's mappings, rekeying, and victim-selection policies unchanged, brings the three affected variants to not more than 10% below the baseline frequency, at the cost of added latency or reduced concurrency. We further identify that increased LLC access latency, rather than additional misses, dominates the number of instructions executed per cycle (IPC), reducing it by up to 5% for SPEC and 11% for GAPBS. The resource overhead varies significantly based on the specific resource, the design, and the implementation technology. For FPGA, we see an increase of 10–35% in the number of lookup tables (LUTs), whereas for ASIC, we see an area increase of 1–14%.

Index Terms—Randomized Caches, Hardware Design

I. INTRODUCTION

Modern processors rely on caches to hide the long latency of memory accesses. However, the timing difference between a cache hit and a miss has become a fertile ground for side-channel attacks [9, 36, 51, 52, 85]. This is especially true for last-level caches (LLCs), which are shared across cores and can be exploited to leak information across security domains [33, 41, 44, 86]. Contention-based attacks exploit this timing difference by filling selected cache sets with attacker-controlled lines and then measuring whether accesses to those lines have become slower, which reveals that the victim

Figure

Fig. 1. Architectural overview of randomized cache implementation.

evicted them. Research over the last two decades has shown that such attacks can leak cryptographic keys [24, 41, 51], keystrokes and user behavior [48, 50, 61, 67], and other sensitive information [30, 39, 66, 84]. Central to these attacks is the construction of minimal eviction sets: collections of addresses that map to the same cache set and can collectively displace a target line [35, 41, 45, 55, 56, 58, 74, 78, 86]. Constructing eviction sets is practical in conventional caches because the mapping of addresses to cache sets predictably partitions memory addresses based on address bits.

Randomized caches counter contention-based attacks by breaking this fixed mapping. Early designs randomized the address-to-cache mapping through lookup tables [80, 81] or randomized the fill policy [40], but these approaches target small L1 caches and scale poorly to large LLCs. Instead, more recent designs [26, 57, 58, 62, 70, 73, 77, 82] compute cache indices with keyed cryptographic functions, called index-derivation functions (IDFs), breaking the direct mapping of addresses to cache sets. Past work has extensively evaluated the security of randomized caches [11, 15, 16, 25, 53, 54, 68], highlighting weaknesses and proposing countermeasures.

Although these proposals describe the high-level design, they stop short of a complete hardware implementation. Existing work focuses primarily on a few isolated implementation concerns. For example, most designs recognize that the IDF must be pipelined to meet timing constraints and estimate the resulting increase in cache access latency. However, integration challenges beyond the IDF, such as critical-path analysis, control pipelining, hazard management and miss-status holding register (MSHR) locking, have received less attention.

In the absence of concrete implementations, performance evaluations primarily rely on architectural simulators [13, 27, 42, 60]. Although these simulators are invaluable for early stage exploration, they tend to abstract away many implementation issues, resulting in inaccuracies [1, 29, 31, 79]. Moreover, the speed of simulation with these tools severely limits the amount of code that can be simulated. Consequently, evaluations only span short sequences of instructions, typically in the low billions or fewer [11, 16, 62]. Hardware cost evaluation faces similar limitations. Without synthesized implementations, area, timing, and energy are typically estimated using analytical models, such as CACTI [46], rather than being derived from an implemented design.

Two works implement variants of CEASER [69] and of SCATTERCACHE [19]. Both target the in-order RocketChip core [17], leaving open how these designs translate to high-performance cores with speculative, out-of-order execution. Moreover, since each work implements only one design, a direct comparison of the implementation trade-offs across designs remains unavailable. This raises the following questions: ① What are the challenges and trade-offs for randomized cache implementation? ② What do they cost in clock frequency, performance, and area once fully integrated?

In this work, we answer these questions through an end-to-end study, illustrated in Figure 1. In the first step, we select four prominent randomized cache designs, CEASER-S [58], SCATTERCACHE [82], SASSCACHE [26], and MIRAGE [62], that highlight different aspects of the design space. We identify several challenges to implementing these—some stem from the skew cache design [65] that most modern randomized caches build on, whereas others are introduced by the relocation and indirection aspects of some specific designs. We propose solutions for these challenges and develop RTL implementations of all four cache designs.

We integrate the different cache design as the LLC of a multi-core out-of-order NaxRiscv [71] RISC-V SoC, and synthesize the resulting systems on FPGA. The synthesized SoCs allow us to characterize the physical properties of the implementations, including maximum operating frequencies, resource utilization, and power consumption. Moreover, by booting Linux on the synthesized SoCs, we execute complete benchmark suites, such as SPEC CPU2017 [72] and GAPBS [6]. The execution speed of the FPGA allows these benchmarks to run to completion—averaging 290 billion instructions per benchmark, with some exceeding one trillion instructions—thereby measuring the performance impact of cache randomization over complete application executions rather than short simulated instruction windows.

We observe that, except for SASSCACHE, whose dynamic partitioning reduces effective cache capacity, randomized-cache designs incur similar instructions-per-cycle (IPC) losses. The loss correlates strongly with the LLC access rate and reaches up to 10% for memory-intensive workloads, while miss-related effects remain secondary. Adding three cycles of latency—matching the IDF latency of SCATTERCACHE and MIRAGE—to a standard set-associative cache reproduces most of IPC loss. Together, these observations indicate that the latency introduced by the IDF, rather than increased cache misses, is the dominant factor for IPC degradation.

We further observe that the IDF is not the only source of signal propagation delays. Even with a pipelined IDF, all designs exhibit a frequency drop ranging from 1% for SCATTERCACHE to 35% for MIRAGE, an effect that has been so far overlooked. Critical-path analysis reveals that asynchronous operations, such as relocation in CEASER-S and indirection in MIRAGE are the primary source for large frequency drops. We redesign SASSCACHE, CEASER-S, and MIRAGE to mitigate these critical paths, recovering much of the lost frequency at the expense of additional LLC latency or cache locking. Overall, after accounting for both IPC degradation and frequency reduction, randomized caches reduce the maximum execution throughput by up to 35%.

In summary, we make the following contributions:

• We provide the first full implementations of advanced SoCs supporting randomized caches (Sections III and IV).

• We identify and analyze the causes of frequency drops in the designs and show how to overcome them (Section V).

• We perform end-to-end comparison of the performance and the resource usage of the designs (Section VI).

References (83)