Hiding the Access Pattern is Not Enough: Exploiting Search Pattern Leakage in Searchable Encryption

Simon Oya, Florian Kerschbaum

TL;DR

Searchable Symmetric Encryption (SSE) schemes often protect databases by hiding which documents are returned (the access pattern), but they frequently leak whether repeated queries search for the same keyword (the search pattern). This paper introduces a highly efficient Maximum Likelihood Estimation (MLE) attack that combines both leakages to recover user queries, completely breaking several recent privacy-preserving SSE defenses and proving that hiding the access pattern alone is insufficient for real-world security.

What Problem Does This Paper Address?

Searchable Symmetric Encryption (SSE) allows a client to store an encrypted database on an untrusted server while retaining the ability to search it. However, basic SSE schemes leak two critical pieces of information to the server:

  1. Access Pattern: The identifiers of the encrypted documents that match a query (revealing the query's "volume").
  2. Search Pattern: Whether or not two queries in a sequence are for the exact same keyword (revealing the query's "frequency").

To prevent attackers from using this leakage to figure out what the client is searching for, researchers have proposed advanced defenses that obfuscate the access pattern (e.g., by adding fake documents to the results or padding response volumes). However, completely hiding the search pattern is computationally expensive, so many modern defenses leave it intact. This paper investigates a critical gap: if an attacker knows the defense mechanism and has access to the search pattern, can they still recover the underlying queries?

Methods

The authors frame query recovery as a Maximum Likelihood Estimation (MLE) problem. Their attack, dubbed sap (Search and Access Pattern-based attack), combines both volume information (from the access pattern) and frequency information (from the search pattern).

The attacker uses auxiliary background knowledge—such as general statistics on word frequencies and document volumes—and compares it against the observed encrypted queries. The attack is formulated as an unbalanced assignment problem and solved efficiently using the Hungarian algorithm.

The most novel aspect of this approach is its defense-awareness. Instead of using a generic attack against an obfuscated database, the authors mathematically model the specific noise or padding introduced by a given defense (e.g., Laplacian noise or differential privacy padding) directly into the MLE cost function. This allows the algorithm to effectively "see through" the defense.

Datasets

Because public datasets containing both emails and actual user search queries do not exist, the authors combined real document datasets with simulated query trends:

  • Enron Email Corpus: A standard benchmark dataset containing 30,109 emails.
  • Lucene java-user Mailing List: A dataset of ~66,400 emails.
  • Google Trends: Used to generate realistic query frequency distributions over time for the keywords present in the email datasets. To simulate a realistic attacker, the auxiliary frequency data given to the attack algorithm was intentionally outdated (offset by 5 weeks).

Key Insights and Ideas

  • Synergy of Leakages: Relying on volume or frequency alone yields poor accuracy. However, combining them provides a massive, non-linear boost to the attacker's success rate. They are highly complementary pieces of information.
  • Defense-Awareness is Fatal: Naive attacks fail miserably against modern SSE defenses. But by simply adjusting the attack's probability model to account for the defense's specific obfuscation rules, the attacker can almost entirely neutralize the protection.
  • Differential Privacy Falls Short in SSE: Defenses that use differential privacy to hide query volumes fail in practice. The privacy guarantees only protect against distinguishing keywords whose true volume differs by exactly one document—a scenario that is practically irrelevant for real-world datasets where keyword volumes vary wildly.
  • Speed vs. Accuracy: The proposed MLE attack is orders of magnitude faster than state-of-the-art graph-matching attacks. Furthermore, unlike graph matching, it does not require the client to query every possible keyword in the universe to achieve high accuracy.

Key Results

  • Baseline Performance: Against an unprotected SSE scheme, the attack achieves 74%, 48%, 37%, and 22% query recovery accuracy for keyword universes of 100, 500, 1,000, and 3,000 respectively, after observing only ~250 queries.
  • Outperforming the State-of-the-Art: The attack is roughly 4x more accurate than existing graph-matching and frequency-only attacks when the client performs a low number of queries, and it runs in seconds rather than hours.
  • Breaking Defenses: The authors tested their tailored attack against three recent defenses configured to high-privacy regimes (1,000 keyword universe):
  • CLRZ (Differentially Private Access Patterns): A naive attack drops to ~1% accuracy. The tailored attack bounces back to 30%, rendering the defense useless despite it imposing a 400-500% bandwidth overhead.
  • PPYY (Differentially Private Volume): The tailored attack recovers 35% of queries, completely bypassing the Laplacian noise padding.
  • SEAL (Multiplicative Volume Padding): The most robust defense tested. It dropped naive accuracy to 3%, but the tailored attack still recovered a non-trivial 23% of queries.

Limitations and Future Work

Limitations: The attack relies on the adversary having auxiliary background information (estimated keyword volumes and frequency trends). While the authors demonstrate the attack works even with imperfect/outdated background data, obtaining this information might be difficult in highly specialized or proprietary domains.

Future Work: The authors stress that future SSE schemes must hide the search pattern to be secure. They suggest several directions for mitigation, though all come with high overhead costs:

  1. Creating access pattern collisions (grouping keywords so they return the same documents).
  2. Using Oblivious RAM (ORAM) to inject fresh randomness into access patterns for every query.
  3. Obfuscating query frequencies by having the client send realistic "dummy" queries.

Summary updated

BibTeX
@inproceedings{oya2021hiding,
  author = {Simon Oya and Florian Kerschbaum},
  title = {{Hiding the Access Pattern is Not Enough: Exploiting Search Pattern Leakage in Searchable Encryption}},
  booktitle = {USENIX Security},
  year = {2021},
}
Figure