Pseudorandom Codes and Watermarks for AI: A Hidden Signal That Can’t Be Erased

14.11.2026

Research Paper • based on arXiv:2512.08918v2 [cs.CR] How the Cryptographic Permutation Conjecture Evolves into an Unremovable Watermark for Language Models Who needs it?  Platforms that need to label AI content; regulators that require traceability; authors who want to prove authorship. The key advantage over previous schemes is  strong adaptive resilience : it allows  public verification when the detection key is known to everyone, without loss of resilience. This changes the deployment model from “one trusted detector” to “anyone can verify.”

Question 10:  What is the minimum demonstration that will convince a user?
For LLM: text with realistic entropy α (≈ 1 bit/token), after  -fraction of edits, is detected with probability  . For now, this is a theoretical guarantee; empirical demonstration on real models is an open task.Õ(α7)1 − negl

Content

  1. Statement of the problem and intrigue
  2. Mechanism: Why Randomness Hides the Signal
  3. History: From CG24 to Subexponential Resilience
  4. New hypothesis: permutation codes
  5. Design: folded RS codes and list recovery
  6. Errors, editing, and strong adaptive resilience
  7. Cryptanalysis: What Can’t Be Removed
  8. Evidence: Statistics, ROBP, and Low-Degree
  9. From PRC to Watermark for LLM
  10. Comparison and fair limits
  11. Practical value and economics
  12. Open questions and the next experiment

Abstract.  Watermarks for generative AI must simultaneously be undetectable and robust against aggressive editing. Christ and Gunn (CRYPTO ’24) showed that this problem is equivalent to constructing pseudorandom codes (PRCs)—secret-key encryption schemes whose ciphertexts are indistinguishable from random ones and whose decryption is robust against errors. However, all known PRC constructions suffered from three drawbacks: quasi-polynomial attacks, a large alphabet requirement for editing resistance, and weak adaptive robustness. The paper arXiv:2512.08918v2 is the first to address all three limitations simultaneously, relying on a new conjecture—  permuted codes conjecture —which is shown to follow from the permuted puzzles conjecture previously used for doubly efficient PIR. We examine how this structure is constructed, what evidence is provided, where its boundaries are, and what questions it leaves open.

1. Statement of the problem and intrigue

⚙️ Detailed research option

Imagine asking a language model to write an essay. As the model writes, it inserts a subtle signal into the text that allows you to later prove that “this text was generated by this model.” This signal doesn’t degrade quality, is undetectable by humans, and is undetectable by statistics. This is  the watermark  for LLM. The problem is that an attacker can try to erase it—replace words, rearrange phrases, or delete paragraphs. A good watermark should survive.

The classic formulation behind this is  pseudorandom error-correcting code  (PRC). Formally, it is a triple of algorithms  (KeyGen, Encode, Decode) over the alphabet Σ, where  Encode(sk) it produces a string that is computationally indistinguishable from uniform (this is undetectability) and  Decode(sk, y') returns  True, even if  y' obtained from by  y = Encode(sk) passing it through an error channel (this is robustness).

Question 1:  What exactly should the technology solve and for whom?
Answer from the article: the task is to label AI content (LLM text, diffusion model images) with a guarantee that the label is not removed by a limited number of edits and does not distort the model output distribution. The user is someone who wants to verify the origin of the content (platform, regulator, author) without relying on a single “trusted detector.”

Intrigue.  Before this work, the question remained open: is it even possible to construct a PRC with subexponential security? All previous constructions hid a structure of size in the codeword  log n; this is necessary for decoding, but it is precisely this structure that enables a brute-force attack in  n^{O(log n)}. It seemed that subexponential security either required fundamentally new ideas or was unattainable.

2. Mechanism: Why randomness hides the signal

⚙️ Detailed research option

Before discussing the hypothesis, let’s understand what exactly makes PRC “pseudo-random.” The intuition is simple: if the ciphertext looks like honest random noise, then no statistical test will distinguish it from the “clean” output of the model. But how can randomness be reconciled with decodability?

The article’s answer is  triple randomization  of the code word  c ∈ C:

  1. Permutation of positions  σ ∈ S [n] : the symbols of the code word are mixed.
  2. Permutations of the alphabet  π₁,…,π n  ∈ S Σ : at each position i the symbol   is replaced by  .cσ(i)πi(cσ(i))
  3. Substitution noise  SC η : each coordinate is replaced with a uniform symbol from Σ with probability η.

Only all three components together produce pseudorandomness. Remove any one, and the distribution becomes distinguishable from uniform. This isn’t a heuristic: for RS codes, the authors prove that without permuting the alphabet, an effective distinguisher exists (Theorem 4.5).

“If we simply wrote down the symbols of the codeword c σ(ij)  in ascending order i j , an attacker could shift the symbol positions by Θ(n) positions using insertions or deletions, and it would be unclear how to recover.” — from section 3.3 of the paper, explaining why indices are needed.

Question 2:  Which physical/mathematical effects are truly necessary, and which are merely alluded to in popular descriptions?
Answer: All three are necessary. The permutation of positions hides the location of each symbol; the permutation of the alphabet hides the exact symbol (it’s like a “one-time pad” on top of the alphabet); noise makes the distribution appear uniform, even for a single position. Remove the noise, and the code is decodable again, meaning it’s discernible. Remove the permutation of the alphabet, and the algebraic structure of the RS code reveals itself.

3. History: From CG24 to Subexponential Persistence

⚙️ Detailed research option

2024, CRYPTO.  Christ and Gunn introduce PRC and show that the watermark for LLM is equivalent to PRC. Their construction is a binary random linear code with embedded sparse parity checks. It is resistant to random substitutions and deletions, but not to arbitrary edits.

2024–2025.  New constructions emerge: GM24 (NeurIPS) based on (log n)-local weak PRFs; GG25 (RANDOM) based on a “planted hypergraph”; AAC⁺25 (STOC) with perfect security. However, they all share a common flaw:  the log n -sparse structure required for decoding allows an attacker to  n^{O(log n)} brute-force it and distinguish the ciphertext from a random string.

2025.  GGW25 and DMR25 show that PRC cannot be constructed as a “black box” from a wide class of primitives; special assumptions are needed.

2026.  The work we’re reviewing takes a quantum leap: it proposes  a new  hypothesis (permuted codes) that doesn’t require sparse structure and achieves subexponential security. It also addresses two other open problems: an edit-resistant binary alphabet and strong adaptive security.

A key shift.  Previous constructions hid  a sparse structure  of size log n. The new construction hides  permutations  —an object that has no short description, meaning it cannot be iterated over in n^{O(log n)}.

4. New hypothesis: permutation codes

⚙️ Detailed research option

Definition (informal).  Let be   a linear code with dual distance  , η = Ω(1) be the constant fraction of substitutions. The distribution   is structured as follows:C ⊆ Fqnd = nΩ(1)Dn,F_q,C,η,T

  1. Random permutations σ ∈ S [n]  and π₁,…,π n  ∈ S F_q are selected .
  2. A random code word is chosen T times  c ← C, permutations are applied to it, then noise SC η .
  3. T results are returned.

Conjecture:  For any such C and any polynomial T , the distribution   is computationally indistinguishable from uniform on  .Dn,F_q,C,η,T(F_qn)T

Test question 3.  Where does confidence come from that a hypothesis is true?
From three sources:

  • Connection with permuted puzzles.  The permuted puzzle conjecture (BHMW21, BW21), previously used for doubly efficient PIR, implies permuted codes. The proof (Theorem 3.4) exploits the fact that, given samples of permuted puzzles, one can “learn” which symbols correspond to a given position, reducing the problem to permuted codes.
  • Statistical uniformity of a small number of samples.  For a constant alphabet,  T = O(log d) the distributions are statistically close (Theorem 4.3). This is proven through the Fourier series expansion of ROBP (Forbes–Kelly) and the fact that the low-frequency terms coincide due to the large dual distance, while the high-frequency terms are small due to noise.
  • Cryptanalysis.  The authors show that  all three  randomizations are necessary (Table 1), and that a wide class of constructions with a “planted” log n-structure are vulnerable to a quasi-polynomial attack.

Question 4:  What assumptions does the model use, and when do they fail?
The hypothesis requires: (a) code linearity, (b) polynomial dual distance, (c) constant noise fraction, (d) a polynomial number of samples. For convolved RS codes (FRS), linearity over the alphabet is violated, so the authors formulate a separate hypothesis, Hypothesis 5.3—permuted FRS conjecture.

5. Design: folded RS codes and list recovery

⚙️ Detailed research option

The simplest PRC construction from permuted codes (Algorithm 3, Section 6) is as follows:  Encode output a sample of ,   plus a one-time pad  ;   remove the pad, reverse the permutations, and apply the code decoder  . This provides resistance to a constant substitution rate  , but not to editing.Dn,F_q,C,η,ToDecodeC

The main technical challenge is edit robustness.  The idea is  Encode to produce not the entire codeword, but  m pairs  written in binary form. Each pair is   a bit. If the attacker makes  -fraction of edits, many pairs remain “almost intact”—up to   edits. The decoder then iterates over all strings in the edit ball around each substring of length  , builds  candidate  lists  , and runs list recovery  for the code  .(i, πi(zσ(i)))log(nq)εEO(log(nq)·εE)O(log(nq))LiC

Why is an RS code insufficient for a watermark?  A watermark requires robustness to the substitution rate  1/2 − Ω(α²), where α is the entropy per token. For an RS code, the size of the edit ball around a pair  (i, z) with this substitution rate reaches  ω(n), which exceeds the list recovery capacity. The solution is  folded RS codes  (FRS): they group  s RS symbols into a single alphabetic character  . This reduces the relative size of the index and allows list recovery to work with the desired parameters (Theorem 5.2).Fqs

Question to be tested 5.  What are the resources and constraints of the design?
Key parameters (Definitions 5.7 and 5.8):  n = λ,   for RS; for FRS  ,  ,  . The decoding time of FRS is  , which is a significant drawback (Theorem 5.7).k = n1/5s = 8/pSub²k = n1/(s+1)Lmax = ns−3λO(1/pSub²)

6. Errors, editing, and strong adaptive resilience

⚙️ Detailed research option

What does “strong adaptive resilience” mean? It’s the worst-case scenario in coding theory: the error channel  is computationally unbounded  and  knows the secret key . This means the attacker sees the watermark’s structure and still can’t remove it without corrupting the text.

Question 6:  How is reliability measured, and what confirms improvement?
Three lemmas:

  • Lemma 5.8  limits the total size of lists   in the decoder. This is the technical core: without list size control, list recovery will not work.Li
  • Lemma 5.9  shows that when passing through a channel that makes at most  -replacements and edits, many correct symbols end up in the lists.(1/2 − pSub, εE)
  • Theorems 5.10 and 5.11  summarize this in the statement: the decoding error probability is  .≤ exp(−nΩ(1))

Fair bound.  For the FRS construction, the decoder runs in  , and the fraction of edits it tolerates is  , where α is the entropy per token. This is  a constant , but very small. Improving the α⁷ rate is an open problem (Section 5.6).λO(1/pSub²)Õ(α7)

7. Cryptanalysis: What Can’t Be Removed

⚙️ Detailed research option

The strength of the article is not only the construction, but also  the attacks that show that all components are necessary.

Attack 1 (Theorem 4.5).  If we remove the alphabet permutation, the RS code becomes resolvable in polynomial time. The idea is that among T noisy codewords, many positions remain “clean”; their values ​​form   polynomials of degree ≤ k. There exists a nonzero polynomial f of low degree that annihilates these points—and this differs from random chance. This is essentially an attack on McEliece with RS codes, using only ciphertexts.(p₁(αi), …, pT(αi))

Attack 2 (Theorem 4.8).  A broad class of constructions where the codeword contains a random string  r and a noise-robust predicate  f(r)is vulnerable to a quasi-polynomial attack. Reason: noise-robustness  f means that it has a Fourier coefficient of degree  O(log n) with weight  ; enumerating all such coefficients yields a discriminator. This class includes CG24 and GM24.n−O(log n)

Question 7:  What alternative explanations should be ruled out?
The authors clearly show that the new construction  does not  fall into attack class 2: its codeword  r also  contains a long  output  F(r), where no bit is noise-resistant, and decoding uses the entire output. It is the polynomial dual distance that blocks the attack.

8. Evidence: Statistics, ROBP, and Low-Degree

⚙️ Detailed research option

A separate section of the work demonstrates that, with a small number of samples and a constant alphabet, the distribution is  statistically  close to uniform. This is interesting in itself, as it links the hypothesis to  low-degree conjecture  —the central hypothesis of algorithmic statistics.

The idea.  Due to the permutation of positions, any distinguisher depends only on the multinomial counters of the T-numbers at each position. Such a distinguisher is implemented by a read-once branching program (ROBP) of width  . A Fourier series (Forbes–Kelly) expansion of ROBP shows that the low-frequency terms coincide due to the large dual distance, while the high-frequency terms are small due to noise. Hence, the estimate   for  .O(n + qT−1)dTV ≤ exp(−Ω(d))T = O(log d)

Corollary (Theorem 4.4).  This yields a special case of low-degree conjecture: if a permutation-symmetric distribution is indistinguishable from a uniform distribution by low-degree polynomials, then it is statistically close to the uniform distribution. This is an independent contribution, interesting even outside of cryptography.

9. From PRC to Watermark for LLM

⚙️ Detailed research option

CG24 transformation: Let   be the probability of the model to assign a 1 to the i-th token. The watermark selects  , where   is the codeword PRC. If   is uniform, the distribution   coincides with the model output (undetectability). If   is the codeword, then   carries a signal, and the Hamming distance between   and   is bounded above   by the entropy α per token.piti ~ Ber(pi − (−1)xi·min{pi, 1 − pi})xxtxtxt(1/2 − Ω(α²))·n

The main result (Theorem 5.14) is that  for any constant α > 0 there exists a watermark that:

  • Undetectable  – computationally indistinguishable from the model output;
  • Sound  — probability of false alarm  negl(λ);
  • β-robust  k  -fraction of edits, where  .Õ(α7)βλ(ℓ) = 8α·ℓ + 2√2·λ

Test Question 8.  What is claimed: theoretical speedup, experiment, or practical utility?
This is  theoretical  work with explicit constants and estimates. There are no experiments. The practical utility lies in the fact that for the first time all three properties are simultaneously achievable, and in the fact that the estimate   provides a concrete (albeit small) guarantee.Õ(α7)

10. Comparison and fair limits

⚙️ Detailed research option

PropertyCG24GM24GG25This work
Subexponential resistance✗✗✗✓ (under the hypothesis)
Binary alphabet✓✗ (polynomial.)✓✓
Edit resistanceonly random deletions✓✗✓ (constant fraction)
Knowledge of the key by the attacker✗✗✗✓ (highly adaptive)
Standardization of the assumptionLPNweak PRFplanted hypergraphpermuted codes (new)
Public encoding✓—✓✗

Question 9:  What obstacles prevent the result from being implemented?
Three main ones: (1) the hypothesis is new and untested; (2) there is no public encoding—detection requires a secret key; (3) the FRS decoder takes  , which is practically unacceptable for small α. The authors honestly list these limitations in Section 5.6.λO(1/α⁴)

11. Practical value and economics

⚙️ Detailed research option

Who needs this?  Platforms that need to label AI content; regulators requiring traceability; authors seeking to prove authorship. The key advantage over previous schemes is  strong adaptive resilience : it enables  public verification when the detection key is publicly known, without loss of resilience. This changes the deployment model from “one trusted detector” to “anyone can verify.”

Question 10:  What is the minimum demonstration that will convince a user?
For LLM: text with realistic entropy α (≈ 1 bit/token), after  -fraction of edits, is detected with probability  . For now, this is a theoretical guarantee; empirical demonstration on real models is an open task.Õ(α7)1 − negl

12. Open questions and the next experiment

⚙️ Detailed research option

  1. Standard Assumptions.  Is it possible to construct subexponentially robust PRCs from LPN/LWE rather than from the new hypothesis? (Section 1.2)
  2. Public encoding.  Is there a design with public encoding, like the CG24 and GG25?
  3. Improving the FRS decoder.  Is it possible to get rid of it  ?λO(1/α⁴)
  4. Improving the α⁷ index.  How large is the constant in   and can it be increased?Õ(α7)
  5. Cryptanalysis of permuted codes.  Are there better attacks than  ?nO(log n)
  6. Low-degree connection.  Is it possible to prove a complete low-degree conjecture using this technique?

The next question to be tested is:  does the watermark’s robustness on real LLMs hold under realistic entropy α ≈ 1 bit/token and an attack that knows the detection key? This requires an experiment: take a model, apply Wat, then an editing channel with a fraction  , and measure the detection probability. Such an experiment would connect the theory of the paper with the practice of LLM watermarking.c·α7

Conclusion

⚙️ Detailed research option

The paper arXiv:2512.08918v2 achieves what until recently seemed unachievable: it simultaneously removes three major limitations of the PRC. Its central idea—replacing the “embedded sparse structure” with  permutations , an object without a short description—is elegant and opens up new directions. But it also raises new questions: how robust is the new conjecture, whether standard assumptions can be used, and how does this work in practice. These are precisely the questions that make the paper interesting for further research.

Sources (from the article under analysis)

⚙️ Detailed research option

  1. M. Christ, S. Gunn. Pseudorandom error-correcting codes. CRYPTO 2024.
  2. N. Golowich, A. Moitra. Edit distance robust watermarks via indexing pseudorandom codes. NeurIPS 2024.
  3. S. Ghentiyala, V. Guruswami. New constructions of pseudorandom codes. RANDOM 2025.
  4. O. Alrabiah, P. Ananth, M. Christ, Y. Dodis, S. Gunn. Ideal pseudorandom codes. STOC 2025.
  5. E. Boyle, J. Holmgren, F. Ma, M. Weiss. On the security of double efficient PIR. ePrint 2021.
  6. K. Blackwell, M. Wootters. A note on the permuted puzzles toy design. arXiv:2108.07885, 2021.
  7. E. Boyle, J. Holmgren, M. Weiss. Permuted puzzles and cryptographic hardness. TCC 2019.
  8. M. Forbes, Z. Kelley. Pseudorandom generators for read-once branching programs, in any order. FOCS 2018.
  9. S. Garg, S. Gunn, M. Wang. Black-box crypto is useless for pseudorandom codes. CoRR 2025.
  10. N. Döttling, A. Müller, M. S. Rajasree. Separating pseudorandom codes from local oracles. ePrint 2025.
  11. V. Guruswami, A. Rudra, M. Sudan. Essential Coding Theory. 2025.
  12. V. Guruswami, M. Sudan. Improved decoding of Reed-Solomon and algebraic-geometric codes. FOCS 1998.
  13. M. Christ, S. Gunn, O. Zamir. Undetectable watermarks for language models. COLT 2024.
  14. J. Kirchenbauer et al. A watermark for large language models. ICML 2023.
  15. S. Aaronson. My AI Safety Lecture for UT Effective Altruism. 2022.