AI-Driven Automated Cryptanalysis: From Rumors to Verifiable Research Processes
This article explores how artificial intelligence transforms cryptanalysis from an intuition-driven manual process into a machine-executable, verifiable workflow. It covers the synergy between AI and cryptographic problems, the architecture of a reliable automated analysis system, the criteria for evaluating a valid "break," the distinction between mathematical proofs and formal verification, and practical recommendations for enterprises and research teams adopting AI in security research.
1. From “Model Cracking” to Automated Cryptanalysis
The application of artificial intelligence in cryptography does not typically involve directly “cracking all passwords” through language generation. Instead, it breaks down cryptanalysis tasks into multiple computable and verifiable sub-problems. For example, an AI system can assist researchers in analyzing algorithm structures, searching for differential paths, finding linear relationships, constructing constraint conditions, generating attack scripts, or conducting formal checks on existing derivations.
The core of automated cryptanalysis is transforming workflows that traditionally rely on expert experience into machine-executable search and verification processes. Traditional cryptanalysis often requires researchers to accumulate an intuition for algorithm structures over a long period, followed by mathematical derivation and experimental validation to propose attack methods. AI can assist in the following areas:
- Structure Identification: Identifying relationships between round functions, substitution layers, diffusion layers, and key schedules.
- Candidate Path Search: Filtering out more valuable candidates from a large number of potential differential, linear, or algebraic paths.
- Constraint Modeling: Converting cryptographic algorithms into Boolean constraints, integer constraints, finite field equations, or other computable models.
- Experimental Automation: Batch generating test samples, executing statistical analyses, and recording intermediate results.
- Proof Assistance: Transforming candidate conclusions into stricter theorems, lemmas, and verifiable proof steps.
Therefore, when evaluating AI’s cryptanalysis capabilities, one should not merely look at whether it outputs a “plausible” conclusion. Instead, the focus should be on whether the conclusion can be independently reproduced, whether it meets strict complexity requirements, and whether it genuinely constitutes a valid attack.
2. Why Cryptography is Suitable for AI Integration
Cryptographic algorithms possess highly structured characteristics. On one hand, their internal mechanisms usually consist of explicit algebraic operations, bitwise operations, permutations, and combination rules. On the other hand, cryptanalysis often involves a massive search space. AI excels at discovering patterns in complex spaces, planning search sequences, and generating candidate solutions, while traditional programs excel at executing precise calculations and exhaustive verification. The two are highly complementary.
Taking differential cryptanalysis as an example, researchers need to examine the probability of an input difference forming a specific output difference after multiple rounds of transformation. Directly enumerating all paths can cause the computational cost to skyrocket. An intelligent system can first predict more promising paths based on local features, and then hand them over to precise programs to calculate probabilities and filter out unqualified candidates.
In linear cryptanalysis, the system needs to find statistical biases between plaintext, ciphertext, and key bits. AI can assist in discovering potential relationships, but the final confirmation must still rely on rigorous statistical experiments to ensure the bias is significant and to avoid mistaking random fluctuations for cryptographic weaknesses.
In algebraic attacks, an algorithm can be represented as a set of equations. AI can attempt to select variables, rearrange equations, or find lower-complexity expressions. However, whether the equations are correct, whether the solution is unique, and whether the attack complexity is lower than exhaustive search all require independent verification.
3. How to Build a Reliable Automated Analysis System
A complete system should not rely on a single model; it should consist of a data layer, a reasoning layer, a computation layer, and a verification layer.
3.1 Algorithm Modeling Layer
First, the target algorithm must be represented in a machine-readable intermediate form. This representation should clearly document:
- Bit width of inputs and outputs;
- Operation sequence for each round;
- Usage of constants and keys;
- Mapping relationships of nonlinear components;
- Data dependencies between modules;
- Observable and unobservable variables.
Modeling errors are among the most common risks. A slight deviation in a shift direction, endianness convention, or constant value can invalidate all subsequently generated “attack results.” Therefore, the modeling phase requires cross-validation using independent implementations, along with testing boundary inputs, all-zero inputs, and repeated byte inputs.
3.2 Intelligent Search Layer
The search layer is responsible for proposing candidate paths, variable partitions, and attack strategies. It can utilize a combination of multiple methods:
- Rule-based heuristic search;
- Model-generated candidate solutions;
- Evolutionary search;
- Monte Carlo sampling;
- Combination of constraint solving and intelligent sorting;
- Dynamic adjustment of search priorities based on historical results.
It is crucial to emphasize that the goal of intelligent search is not to directly replace mathematical proofs, but to reduce the cost of finding candidate solutions. Any intermediate conclusion generated by a model should be treated as a “hypothesis to be verified,” not as a final fact.
3.3 Exact Computation Layer
The exact computation layer is responsible for executing unambiguous mathematical operations, including finite field operations, probability calculations, matrix transformations, constraint solving, and complexity estimation. This layer should rely on deterministic programs as much as possible, avoiding the use of natural language models for core numerical calculations.
For example, a candidate differential path must be verified for at least the following:
- Whether each local transition satisfies the definition;
- Whether the probabilities of each round can be correctly combined;
- Whether there are conflicts in the path;
- Whether the required sample size is feasible;
- Whether the total attack complexity is lower than the baseline method;
- Whether the results can be reproduced across different implementations.
3.4 Evidence and Audit Layer
The system must maintain complete experimental records, including input configurations, random seeds, program versions, candidate paths, filtering conditions, failure cases, and final results. Only in this way can other researchers reproduce the experiments and determine whether the results are stable phenomena or occasional errors.
In the security domain, a statement that “the model found a vulnerability” is far from enough. More valuable evidence usually includes public algorithm descriptions, reproducible code, independent implementations, statistical significance analyses, and clear complexity comparisons.
4. How to Determine if a “Break” is Valid
The term “break” is often misused in technical communication. Results at different levels carry completely different security implications.
The first category is structural observations. For example, discovering slight correlations between certain inputs and outputs, or a component exhibiting statistical features worth studying. Such results are usually just research leads and cannot be directly called a break.
The second category is theoretical attacks. Researchers mathematically prove that a certain attack outperforms the ideal random baseline, but the attack might require extremely high data volumes or computational resources. Being theoretically valid does not mean it is practically executable.
The third category is implementable attacks. The attack is not only theoretically valid but also runnable within reasonable resource limits, successfully recovering partial information or distinguishing the target algorithm from random objects.
The fourth category is complete decryption or key recovery. This requires clear success conditions, reproducible experiments, and results directly corresponding to security objectives. If success only occurs under reduced rounds, weak keys, or non-standard parameters, it cannot be inferred that the full algorithm has been broken.
Therefore, when reporting any AI cryptanalysis achievement, it is necessary to specify the attack target, parameter scope, success probability, data complexity, time complexity, storage requirements, and applicable limitations.
5. The Difference Between Mathematical Proofs and Formal Verification
AI-generated mathematical derivations do not equate to an established proof. Proofs in natural language may contain skipped steps, implicit assumptions, symbol misuse, or missing boundary conditions. Especially in complex mathematical problems, a seemingly reasonable conclusion might rely on unproven premises.
The goal of formal verification is to transform definitions, axioms, lemmas, and inference steps into machine-checkable logical objects. A verification system will check step-by-step whether each step conforms to established rules, but it can only confirm “whether the formalized expression derives the conclusion from the premises.” It cannot automatically guarantee that:
- The formalized proposition is exactly the problem researchers intended to prove;
- All real-world semantics have been accurately encoded;
- The axiomatic system used meets expectations;
- The input files do not omit critical assumptions;
- The proof conclusion can directly translate into engineering capabilities.
Therefore, AI achievements regarding major mathematical problems should distinguish between different stages: “proposing a conjecture,” “generating a proof draft,” “completing partial formalization,” “passing complete machine checking,” and “undergoing independent expert review.” Only after public materials and independent review should definitive statements be used.
6. Why Performance Claims Need Careful Interpretation
Claims like “tens of thousands of times faster than a certain method” must clearly define the comparison object and test conditions. Speed might stem from various factors, such as:
- Only comparing candidate generation time without calculating verification time;
- Only testing on downscaled problems;
- Using pre-prepared data or caching;
- Comparing after merging multiple baseline steps;
- Ignoring differences in hardware, parallelism, and implementation language;
- Recording the time to find the first result rather than a stable success rate;
- Sacrificing accuracy for faster output.
A reasonable performance report should at least include baseline task definitions, hardware environments, program versions, data scales, repetition counts, averages, variances, success rates, and failure samples. For cryptanalysis, the relationship between attack complexity and the traditional security baseline must also be reported, rather than just providing an isolated multiplier.
7. Practical Recommendations for Enterprises and Research Teams
If an organization intends to introduce AI-assisted security research, a three-tier process of “model proposes, program verifies, expert reviews” is recommended.
Step 1: Establish a controlled experimental environment. All algorithms, data, and key materials should use specially generated test objects. Directly inputting real production keys, user privacy, or unanonymized logs into external models is prohibited.
Step 2: Set up a dual verification mechanism. Every candidate conclusion output by the model should be checked by an independent program; important results should also be cross-reviewed by another implementation or a different team.
Step 3: Build a failure sample library. Incorrect reasoning, fabricated formulas, boundary condition omissions, and statistical misjudgments are often more valuable for training than success cases. Continuously accumulating failure samples can improve the reliability of subsequent systems.
Step 4: Define clear security boundaries. AI can assist in auditing and research, but it should not conduct tests against real systems without authorization. All verification activities should have clear scopes, approval records, and emergency measures.
Step 5: Prioritize explainability. The system should be able to explain which inputs a candidate attack came from, what reasoning steps it underwent, what assumptions it relies on, and which program ultimately completed the verification.
8. Conclusion: True Breakthroughs are Reproducible, Auditable, and Transferable
Artificial intelligence is changing the way cryptanalysis and mathematical research are conducted. Its greatest value may not lie in instantly producing a startling conclusion, but in its ability to continuously propose hypotheses within a large-scale candidate space and form a closed loop with precise computation and formal verification tools.
Facing expressions like “major breakthrough,” “record-breaking,” or “far exceeding traditional methods,” technical personnel should return to a few fundamental questions: Are the results public? Is the process reproducible? Are the definitions clear? Is the complexity reasonable? Have the conclusions been independently verified? Only when these questions are fully answered can AI-generated results truly transform from demonstrative outputs into credible scientific discoveries or actionable security capabilities.
