Pseudorandom error-correcting codes (PRC) is a novel cryptographic primitive proposed at CRYPTO 2024. Due to the dual capability of pseudorandomness and error correction, PRC has been recognized as a promising foundational component for watermarking AI-generated content. However, the security of PRC has not been thoroughly analyzed, especially with concrete parameters or even in the face of cryptographic attacks. To fill this gap, we present the first cryptanalysis of PRC. We first propose three attacks to challenge the undetectability and robustness assumptions of PRC. Among them, two attacks aim to distinguish PRC-based codewords from plain vectors, and one attack aims to compromise the decoding process of PRC. Our attacks successfully undermine the claimed security guarantees across all parameter configurations. Notably, our attack can detect the presence of a watermark with overwhelming probability at a cost of $2^{22}$ operations. We also validate our approach by attacking real-world large generative models such as DeepSeek and Stable Diffusion. To mitigate our attacks, we further propose three defenses to enhance the security of PRC, including parameter suggestions, implementation suggestions, and constructing a revised key generation algorithm. Our proposed revised key generation function effectively prevents the occurrence of weak keys. However, we highlight that the current PRC-based watermarking scheme still cannot achieve a 128-bit security under our parameter suggestions due to the inherent configurations of large generative models, such as the maximum output length of large language models.
翻译:伪随机纠错码(PRC)是CRYPTO 2024会议上提出的一种新型密码学原语。由于其兼具伪随机性和纠错能力,PRC已被视为一种有前景的、可用于AI生成内容水印的基础组件。然而,PRC的安全性尚未得到深入分析,特别是在具体参数设置下,甚至面临密码学攻击时。为填补这一空白,我们首次对PRC进行了密码分析。我们首先提出了三种攻击方法,以挑战PRC的不可检测性和鲁棒性假设。其中,两种攻击旨在区分基于PRC的码字与普通向量,另一种攻击则旨在破坏PRC的解码过程。我们的攻击成功地在所有参数配置下削弱了其声称的安全保证。值得注意的是,我们的攻击能够以$2^{22}$次运算的代价,以压倒性概率检测出水印的存在。我们还通过攻击真实世界的大型生成模型(如DeepSeek和Stable Diffusion)验证了我们的方法。为缓解这些攻击,我们进一步提出了三种防御措施以增强PRC的安全性,包括参数建议、实现建议以及构建一种修订的密钥生成算法。我们提出的修订密钥生成函数能有效防止弱密钥的出现。然而,我们强调,由于大型生成模型(例如大语言模型的最大输出长度)的固有配置限制,基于PRC的水印方案在我们建议的参数下仍无法实现128比特的安全强度。