Pseudorandom Codes: Invisible Watermarks for AI and Post-Quantum Cryptography

20.11.2026

A research paper based on the work “Ideal Pseudorandom Codes” (Alrabiah, Ananth, Christ, Dodis, Gunn, arXiv:2411.05947v1, November 2024) The central paradox:  How to transmit a message so that the channel  cannot distinguish  it from pure noise, but the recipient  can reliably recover  it even after deliberate distortion? This paradox is solved by a pseudorandom code (PRC)—an object that combines cryptography and coding theory and underlies invisible watermarks for generative AI.

Content

⚙️ Detailed research option

  1. Statement of the problem and intrigue
  2. Physical and mathematical mechanism
  3. History and scientific debate
  4. Key findings of the 2024 paper
  5. Algorithms, errors and correction
  6. Connection with quantum technologies
  7. Practical value and risks
  8. Experiment, evidence, reproducibility
  9. Open questions and next steps
  10. Statement Verification Checklist

1. Statement of the problem and intrigue

⚙️ Detailed research option

Imagine Alice wants to send a message to Bob over a channel that is both  untrusted  (there’s an eavesdropper) and  unreliable (information is subject to corruption). The classic solution—encrypting and then adding a noise-resistant key—works if the content  needs to be hidden  . But what if Alice doesn’t want the channel  to know anything about the transmission ?

This is precisely the challenge that arises with  watermarking for generative AI : we want the model’s output to look like regular random content, but contain a hidden, edit-resistant label. Formally, we need an object that:

  • for keyless adversaries  , computationally indistinguishable  from a uniformly random string;
  • for the key owner  it is decoded  even after distortions.

This object is called  a pseudorandom code  (PRC). It was introduced by Christ and Gann at CRYPTO 2024. The 2024 paper, which is the subject of this article, answers three previously open questions:

  1. Is it possible to make PRCs  adaptively robust  —that is, resistant to errors that depend on previously seen codewords and even the encryption key?
  2. Is it possible to define  perfect security that combines pseudo-randomness and robustness into a single definition?
  3. Is it possible to build  a CCA-secure  public-key PRC, similar to CCA-secure encryption?

Why this isn’t just abstract theory.  Existing PRCs (and corresponding watermarks) were only resistant to  oblivious  errors. A real adversary sees multiple watermarks and occasionally queries the detection oracle. Practical attacks are known that exploit access to encoding/decoding oracles to remove or forge watermarks (JSV24, PHZS24).

2. Physical and mathematical mechanism: how the PRC works

⚙️ Detailed research option

2.1 Public Key Definition

⚙️ Detailed research option

PRC consists of a pair of efficient randomized algorithms   and  , parameterized by keys, and satisfies three properties for the security parameter λ:EncodepkDecodesk

  • Oblivious stability:  for any message m, the probability   as x ←   is not less than 1 − negl(λ).Decodesk(E(x)) = mEncodepk(m)
  • Soundness:  for any fixed string c, the probability   is at least 1 − negl(λ).Decodesk(c) = ⊥
  • Pseudo-randomness:  for any polynomial adversary A, the difference between interacting with   and with an oracle returning a fresh uniform string is negligible.Encodepk

2.2. Design on LDPC codes

⚙️ Detailed research option

In the Christ–Gann paper, the secret key is a parity-check matrix  H ∈ F₂^{r×n}whose rows are chosen from a set of   t-sparse vectors (t = Θ(log n), r = n Ω(1) ). The public key is a matrix   with  , d = Θ(log² n).St,nG ∈ F₂^{n×d}HG = 0

Encoding 1:  c ⊕ e*, where c ← Im(G), e* ← S ηn,n . Decoding: compute weight  wt(Hx); if it is significantly less than r/2, return 1, otherwise ⊥.

Key lemma (informally):  For any code C ⊆ F₂ⁿ, there exists γ C  ∈ ℝ such that for all x ∈ F₂ⁿ:

bias(P C,t , x) = γ C  Σ c∈C  bias(S t,n , x ⊕ c),

where P C,t  = C ⊥  ∩ S t,n , and bias(S, z) = E w←S [(-1) 1{w z=1} ]. For a random linear code γ C  = 1 ± negl(n).

This lemma, based on ideas from Boolean function analysis and the Johnson bound, allows us to prove that for an error e of small weight  . This means that the random test from P C,t  is satisfied by e with probability significantly greater than 1/2. The Chernoff bound on the choice of H completes the proof of adaptive stability.bias(He) ≈ bias(e)t

2.3 Why one zero-bit construction is not enough

⚙️ Detailed research option

A zero-bit PRC encodes only a fixed message. If ⊥ is interpreted as 0, security only requires that the encoding of 1 be incapable of being converted to 0. For a one-bit PRC, the reverse conversion must also be prohibited. The solution is two independent key pairs (H₀,G₀) and (H₁,G₁) and an encoding of m as a noisy sample from Im(G m ).

3. History and scientific debate

⚙️ Detailed research option

Chronology of key events:

  1. CRYPTO 2024  — Christ and Gann introduce PRC and demonstrate its applicability to watermarking language models. Their construction, based on LDPC codes, is robust to oblivious errors.
  2. S&P 2025 (preprint)  — Cohen, Hoover, and Schoenbach show that the CGZ24 watermark is adaptively robust to only a very low (inversely proportional to the security parameter) error rate, and  conjecture that the Christ–Gann PRC is adaptively robust to a constant rate.
  3. November 2024  – Alrabiah et al. prove this conjecture for δ < 1/4 (1-bit) and δ < 1/2 (0-bit), and introduce perfect and CCA security.

A scientific debate.  Until 2024, it was unknown whether adaptive PRC robustness to a constant error rate could even be achieved. Moreover, there were examples (CHS24) showing that PRCs robust to obliviation attacks could be easily eliminated by an adaptive adversary. The 2024 paper resolves this controversy, demonstrating that a correct construction using LDPC codes is indeed adaptively robust.

4. Key results of the 2024 article

⚙️ Detailed research option

Four main results and their quantitative characteristics:

δ < 1/2 zero-bit PRC is adaptively stable (Theorem 1)

δ < 1/4 one-bit PRC is adaptively stable (Theorem 2)

Linear speed ideal PRC with linear information speed (Theorem 3)

Ω(δ) CCA-secure PRC in the random oracle model (Theorem 4)

4.1 Four Definitions of Sustainability

⚙️ Detailed research option

No access to decoderWith access to the decoder
Secret keyAdaptive resilience (secret key)Perfect security
Public keyAdaptive Resilience (Public Key)CCA safety

4.2. Ideal security

⚙️ Detailed research option

Instead of a growing list of individual properties, the authors define  ideal PRC functionality  —the behavior that code must exhibit to any adversary, regardless of its purpose. A PRC satisfies ideal security if real encoding and decoding oracles are indistinguishable from this ideal functionality. This single definition combines correctness, pseudorandomness, and adaptive resilience.

4.3. CCA security

⚙️ Detailed research option

In public key terms, the equivalent of perfect security is CCA security, defined by analogy with CCA-secure encryption. In the random oracle model, the authors construct a general transformation: any adaptively robust public PRC transforms into an Ω(δ)-resistant CCA-secure PRC with linear speed.

4.4. Investigation for LPN

⚙️ Detailed research option

Applying Theorems 2–4 to the Christ–Gann construction, which is pseudorandom under the assumption of 2 O(√λ) -complexity of LPN, we obtain:

Corollary 5.  Under the assumption of 2 O(√λ) -complexity of Learning Parity with Noise, there exist distinct linear-speed PRCs that provide:
• δ-resistant perfect security for any δ < 1/4;
• δ-resistant CCA security for some δ = Ω(1) in the random oracle model.

5. Algorithms, errors and correction

⚙️ Detailed research option

5.1. Error model

⚙️ Detailed research option

This paper considers only  substitutions  , not insertions/deletions. This is sufficient for applications where PRC is embedded in a fixed-length semantic representation of content (e.g., the latent space of diffusion models in GZS24).

5.2. Adaptive vs. oblivious resistance

⚙️ Detailed research option

Oblivious resilience assumes that the error channel is independent of keys and previously seen codewords. Adaptive resilience allows the adversary to:

  • choose a message m and a randomness r that determine the code word c = Encode(pk, m; r);
  • choose the weight error e ≤ δn, possibly depending on pk (but not on sk);
  • win if c ⊕ e does not decode to m.

5.3 Why are optimal boundaries exactly as they are?

⚙️ Detailed research option

Any zero-bit PRC cannot be adaptively robust to more than 1/2 errors: such errors can completely randomize the codeword. Any one-bit PRC cannot be adaptively robust to more than 1/4 errors: an adversary can construct a string that is 1/4 away from codewords encoding different messages. Theorems 1 and 2 achieve these bounds up to ε.

6. Connection with quantum technologies

⚙️ Detailed research option

At first glance, the PRC appears to be a purely classical object. However, its connection to the quantum era is deep and multilayered.

6.1 LPN as a post-quantum assumption

⚙️ Detailed research option

The security of the Christ-Gann construction relies on  Learning Parity with Noise  , a problem for which no efficient quantum algorithms are known. LPN belongs to a family of post-quantum assumptions (along with the lattice problems that underlie FIPS 203/204/205, approved by NIST in August 2024). Thus, PRC is  a post-quantum primitive : its security is not broken by known quantum attacks.

6.2 Quantum Computing and AI Watermarking

⚙️ Detailed research option

The development of quantum computing accelerates generative models and makes the problem of AI content protection even more pressing. PRC-based watermarks are one of the few approaches that simultaneously preserve  generation quality  (indistinguishability from unlabeled output) and  robustness  . In the quantum era, when content counterfeiting is becoming widespread, such primitives acquire strategic importance.

6.3. Code cryptography

⚙️ Detailed research option

The LDPC codes underlying PRC are the same codes being studied in code cryptography (McEliece, Niederreiter). Improving the analysis of LDPC constructions may yield implications for post-quantum code-based schemes.

Be careful with interpretation.  The 2024 paper doesn’t claim that PRC directly protects against quantum attacks. It provides  a post-quantum-resistant  primitive for AI watermarking. The direct connection to quantum computing is through LPN and code cryptography, not quantum algorithms.

7. Practical value and risks

⚙️ Detailed research option

7.1 Watermarking for Generative AI

⚙️ Detailed research option

The Christ–Gann pattern: if there is an algorithm for recovering randomness r from an output y, then replacing r with  PRC.Encode(1) produces a watermark. Pseudo-randomness ensures indistinguishability, while robustness ensures detection. This approach was experimentally demonstrated in GZS24 for latent diffusion models of images.

7.2. What does adaptive resilience provide?

⚙️ Detailed research option

  • Multi-query attacks:  An adversary making an arbitrary number of queries to the generator corresponds to an adaptive error channel PRC.
  • Detection oracle attacks:  An adversary with access to the watermark detector matches a PRC with access to the decoder—this is perfect security.
  • Generation key attacks:  An adversary with a watermark key and a detection oracle matches a CCA-secure PRC.

7.3. Risks and limitations

⚙️ Detailed research option

  • Only replacements are considered, not insertions/deletions.
  • Binary alphabet: For language models with ~1 bit of entropy per word, this is significant.
  • CCA security is achieved only in the random oracle model and with the loss of a constant factor in stability.
  • All known PRCs have quasi-polynomial discrimination attacks (CG24, GM24, GG24) – this limitation is not lifted.

8. Experiment, evidence, reproducibility

⚙️ Detailed research option

The 2024 work is  theoretical . Its foundations are:

  • Proofs:  Shift Lemma, Johnson Bound, Chernoff Bounds, Reduction to LPN.
  • There are no numerical experiments  – this is a mathematical article.
  • Comparison with practice:  The experimental demonstration of GZS24 uses the same PRC design for images, but does not test adaptive robustness directly.

To independently test the key finding (adaptive robustness) would require:

  1. implement a design with specific parameters (n, t, r, d);
  2. generate H and G according to the distribution;
  3. implement an adaptive adversary that chooses e based on pk;
  4. empirically measure the proportion of successful attacks for δ < 1/4.

This is beyond the scope of this article, but is a natural next step.

9. Open questions and next steps

⚙️ Detailed research option

  1. Optimal CCA stability.  Theorem 4 yields Ω(δ), but doesn’t achieve the optimal 1/4. Can it be improved?
  2. Insertions and deletions.  Does the analysis cover edit channels, not just replacements?
  3. Alphabets are larger than binary.  How does stability change as the alphabet grows?
  4. Quasi-polynomial attacks.  Is it possible to construct a PRC without known quasi-polynomial-time discrimination attacks?
  5. Connection to quantum cryptography.  Is it possible to determine quantum PRCs and their security?
  6. Practical implementation.  What parameters are sufficient for real-world image and text watermarking?
  7. Standardization.  Could PRC be incorporated into AI watermarking standards (similar to FIPS for post-quantum cryptography)?

Fair warning.  Claims of “post-quantum watermarking” require caution: the LPN assumption is a hypothesis, not a proven fact. Quantum computers cannot break LPNs using known methods, but that doesn’t mean PRC is completely secure.

10. Statement Verification Checklist

⚙️ Detailed research option

  • ☐ Evidence (theorems) are separated from empirical data (GZS24).
  • ☐ It is noted that adaptive stability is proven for δ < 1/4 (one-bit) and δ < 1/2 (zero-bit), and not for arbitrary δ.
  • ☐ It is noted that CCA security is only in the random oracle model.
  • ☐ It is not claimed that PRCs are “quantum-proof” directly – communication is via LPN and code cryptography.
  • ☐ Limitations specified: substitutions only, binary alphabet, quasi-polynomial distinction attacks.
  • ☐ Each quantitative statement (δ, speed, complexity) is associated with a specific theorem.
  • ☐ It is clear to the reader what is new in the 2024 work compared to CRYPTO 2024 and S&P 2025.

Final formulation of the contribution

⚙️ Detailed research option

The work by Alrabiah, Ananth, Christ, Dodis, and Gunn (2024) proves that PRCs on LDPC codes  are adaptively robust  to a constant substitution rate, introduces  perfect security  as a unified definition, and constructs  CCA-secure PRCs  in a random oracle model. Under the assumption of 2 O(√λ) -complexity of LPN, this yields post-quantum-secure primitives for AI watermarking—with linear information rate and robustness optimal for a perfect PRC.

Possible titles for future articles

⚙️ Detailed research option

  • “What Exactly Limits PRC Adaptive Resilience: Three Explanations and a Crucial Test”
  • “When an LDPC Design Outperforms Alternatives: A Comparison with Equal Error Rates”
  • “From a Lab Theorem to an Industrial Watermark: What PRC Is Missing”

Sources.  Alrabiah O., Ananth P., Christ M., Dodis Y., Gunn S. “Ideal Pseudorandom Codes”, arXiv:2411.05947v1, November 2024. Christ M., Gunn S. “Pseudorandom Error-Correcting Codes”, CRYPTO 2024. Cohen A., Hoover K., Schoenbach L., S&P 2025. Gunn S., Zhao X., Song D. (GZS24), 2024. NIST FIPS 203/204/205, August 2024.