Research
LLM-Generated Cryptographic Rust Code: Only 23.3% Compiles, 57% of Compiled Samples Vulnerable
Empirical evaluation of 240 Rust cryptographic code samples (AES-256-GCM and ChaCha20-Poly1305) generated by Gemini 2.5 Pro, GPT-4o, and DeepSeek Coder across four prompt strategies. Only 23.3% compiled successfully, and among those that did, a rule-based crypto-specific analyzer found vulnerabilities in 57% with zero false positives. CodeQL produced only two false positives. Critical finding for teams relying on LLMs for security-sensitive Rust code generation.
Source
↳ Follow the thread