Shuffling failed to hide text fragments in KV-Cloak caches
The method achieved 100 percent recovery of tokens and their counts on graphics processors in tests using 3,000 real user prompts.

Our read
- Studied:
- Preprint: method
Editor of record: Boris Djordjevic · Paperfoot
Repeat-to-Reveal, a token-recovery method, recovered tokens and their counts from official KV-Cloak caches in tests using 3,000 real WildChat user prompts across nine models and eleven configurations. Tokens are pieces of text a language model processes; caches store internal representations of them.
KV-Cloak combines secret mathematical transformations with fresh row shuffles. Repeated tokens produced identical rows in one part of the cache, so shuffling those rows changed nothing. Differences in an auxiliary marker let the attack recover an equivalent tool for removing the obfuscation without knowing the secret parameters. One calibration using the attacker’s own probes transferred to later requests sharing those secrets. The attack matched against a public model and achieved 100 percent recovery of tokens and their counts on graphics processors, without their order. Refreshing row-level secrets between reuse periods interrupted this transfer.
Why it matters
The tests showed why counting possible shuffles can overstate protection when chosen inputs make those shuffles indistinguishable. In KV-Cloak, secret reuse let calibration on an attacker’s own requests enable recovery from later requests.
Caveats
Recovery required calibration using the attacker’s own probes and access to later cache blocks sharing the same secrets; it did not recover token order. The work is a preprint.
In this paper
token recovery from obfuscated KV caches
- Methods
- Repeat-to-Reveal (this paper)VeilKV (this paper)KV-Cloak (evaluated)sequence-permutation implementation of Thomas et al. (evaluated)PermLLM (evaluated)
- Datasets
- WildChat (evaluated)
Results
- Repeat-to-Reveal, token-multiset recovery, on WildChat, on GPU: 100 percent
The attack recovers the secret parameters with high accuracy and achieves 100 percent token-multiset recovery on GPU.
Abstract
- Repeat-to-Reveal, mean sentence-embedding cosine, on WildChat: 0.947; Repeat-to-Reveal, expected top-1 accuracy, on WildChat: 97.5%
Beam-search reordering of the recovered tokens reaches a mean sentence-embedding cosine of 0.947 with the originals, and sensitive-value identification achieves 97.5% expected top-1 accuracy.
V Evaluation
What it shows
- Input symmetry collapses the nominal randomization of shuffled KV cache obfuscation from b! permutations to b distinguishable states.
The attack on KV-Cloak succeeds because a repeated-token input collapses the effective randomization from b! permutations to b distinguishable states.
VI-A Orbit Collapse as a Paradigm Problem
- A repeated-token input causes every row permutation to leave the data matrix unchanged.
By submitting a prompt whose tokens repeat within every block, the attacker forces all Value rows to be identical, making row permutations act as the identity on the data matrix (Figure 2).
III-A Input Symmetry Collapses the Orbit
- Orbit collapse manifests on other open-source shuffled obfuscation defenses besides KV-Cloak.
We further confirm orbit collapse on two other open-source defenses: the sequence-permutation implementation of Thomas et al. and PermLLM.
Abstract
- Refreshing row-level secrets between epochs prevents transfer across requests.
Refreshing row-level secrets between epochs interrupts cross-request transfer, confirming secret reuse scope as the operative vulnerability.
Abstract
Quoted word for word from the full text on arXiv.
The paper
When Shuffling Fails: Token Recovery from Obfuscated KV Caches
arXiv, Nov 18, 2026, Open access, Preprint, not yet peer-reviewed
doi.org/10.48550/arxiv.2611.24276
arXiv:2611.24276v1 in cs.CR
Comments: 18 pages, 8 figures, 4 tables
Cite as BibTeX
@misc{yi2026when,
title = {When Shuffling Fails: Token Recovery from Obfuscated KV Caches},
author = {Yi, Chengzhi and Cheng, Xiao and Song, Wei and Wang, Haoyu},
year = {2026},
eprint = {2611.24276},
archivePrefix = {arXiv},
primaryClass = {cs.CR},
doi = {10.48550/arxiv.2611.24276},
url = {https://arxiv.org/abs/2611.24276}
}

