← Latest papers
🤖 AI

CIPHER: Cryptographic Insecurity Profiling via Hybrid Evaluation of Responses

This paper introduces CIPHER, a benchmark and automated scoring pipeline designed to evaluate and quantify cryptographic vulnerabilities in code generated by large language models, revealing that while explicit secure prompting mitigates some issues, it fails to reliably eliminate cryptographic flaws across diverse models.

Original authors: Max Manolov, Tony Gao, Siddharth Shukla, Cheng-Ting Chou, Ryan Lagasse

Published 2026-02-09
📖 4 min read☕ Coffee break read

Original authors: Max Manolov, Tony Gao, Siddharth Shukla, Cheng-Ting Chou, Ryan Lagasse

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are hiring a team of incredibly fast, super-smart robots to write the locks and keys for your bank vault. You tell them, "Make a secure lock," and they instantly spit out a design. But here's the catch: even though the robots are brilliant, they often build locks that look perfect on the outside but have tiny, invisible cracks that a thief could easily exploit.

This paper introduces CIPHER, a new "report card" designed to test exactly how good these AI robots are at building secure cryptographic locks (like encryption and password protection) in computer code.

Here is the breakdown of what the researchers did and found, using simple analogies:

1. The Problem: The "Silent Flaw"

When AI writes code for security, it often passes the basic tests (the code runs without crashing), but it misses the subtle security rules.

  • The Analogy: Imagine a robot building a house. It puts up the walls and a roof (the code works), but it forgets to install a deadbolt on the front door or leaves the back window unlocked (a security flaw). The house stands up, but it's not safe.
  • The Issue: These flaws are often tiny design choices, like using a "static" key (a key that never changes) instead of a random one, or forgetting to check if a person is who they say they are.

2. The Solution: The CIPHER Test

The researchers created a standardized test called CIPHER to measure how often these AI robots make these mistakes.

  • The Setup: They gave the same 150 different "jobs" to 7 different AI models. For each job, they gave the AI three different instructions (prompts):
    1. The "Bad" Prompt: "Do this quickly, and don't worry about security checks." (Testing if the AI follows bad advice).
    2. The "Neutral" Prompt: "Just write the code to do this." (Testing what the AI does by default).
    3. The "Secure" Prompt: "Do this, but make sure it follows all the strictest security rules!" (Testing if telling the AI to be safe actually works).
  • The Scoring: Instead of humans reading every single line of code (which takes forever), they used another AI as a "Judge." This Judge was trained to look for specific types of lock-breaking errors and point out exactly which line of code was the problem.

3. The Results: "Be Safe" Isn't Enough

The results were surprising and a bit worrying.

  • The "Bad" Prompt: As expected, when the AI was told to be careless, it made many mistakes.
  • The "Secure" Prompt: This is the big finding. Even when the researchers explicitly told the AI, "Be super secure! Follow all the rules!", the AI still made mistakes about 56% to 89% of the time.
  • The Analogy: It's like telling a chef, "Make a healthy meal, no sugar, no salt, and use fresh ingredients." The chef might remove the sugar (the specific thing you asked for), but they might still use spoiled meat or forget to wash the vegetables (other hidden dangers). The AI fixes the specific thing you asked it to fix, but it fails to build a globally secure system.

4. What This Means

The paper concludes that simply telling an AI to "be secure" doesn't reliably stop it from making dangerous mistakes.

  • The Takeaway: You cannot just trust an AI to write security code, even if you give it a very strict prompt. The AI tends to focus on the specific instruction it was given (like "use a random key") but misses the bigger picture (like "also check the user's identity").
  • The Recommendation: Because the AI keeps making these hidden cracks in the "locks," any code it writes for security needs to be double-checked by a human expert before it is used in the real world.

Summary

CIPHER is a tool that proves that while AI is great at writing code, it is currently very bad at writing safe code. Even when you explicitly tell it to be safe, it often leaves the back door open. The paper provides a way to measure these failures so developers know they can't rely on AI alone for security tasks.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →