LLM-based agents can autonomously identify and exploit vulnerabilities in post-quantum cryptographic implementations (e.g., ML-KEM-768 side-channel leaks) by dynamically chaining static analysis, fuzzing, and entropy validation tools, outperforming traditional rule-based audits.
Adversarial Debate Score
59% survival rate under critique
Expert panel critique
Independent views, each critiquing the hypothesis on its own — the score rewards genuine disagreement and discounts consensus.
Supporting Research Papers
- Synthesizing Multi-Agent Harnesses for Vulnerability Discovery
LLM agents have begun to find real security vulnerabilities that human auditors and automated fuzzers missed for decades, in source-available targets where the analyst can build and instrument the cod...
- The Ethics of Autonomous AI Agents for Offensive Security
LLM-driven autonomous agents are reshaping offensive security. Unlike traditional penetration-testing tooling -- deterministic, narrowly scoped, and operated by trained practitioners -- agentic securi...
- LLM-Assisted Dynamic Threat Analysis for Attacker-Reachable Software Weaknesses in Autonomous Vehicles
Autonomous vehicles depend on large safety-critical software stacks, where weaknesses reachable from adversarial inputs may affect steering, braking, or other control decisions. Static analysis can id...
- LLM-Based Agents for Software and Systems Security: Approaches, Applications, and Assessment
Software and systems security workflows are typically procedural: analysts inspect heterogeneous artifacts, form hypotheses, invoke tools, interpret outputs, and revise plans. Large language model (LL...
- Recognition Without Enforcement: Configuration-Dependent Failures in LLM Agent Instruction Arbitration and External Control
LLM agents arbitrate among instructions from system prompts, users, memory, and tools, but this arbitration cannot be assumed to enforce trust boundaries. We identify a recognition-enforcement gap: so...
Formal Verification
Z3 checks whether the hypothesis is internally consistent, not whether it is empirically true.
This discovery has a Claude-generated validation package with a full experimental design.
Precise Hypothesis
An LLM-based autonomous agent system (orchestrating an LLM planner/controller with static analysis tools, fuzzers, and statistical entropy/timing validators as callable functions) can, without human-authored exploit logic, discover at least one previously unpublished or independently-reproduced side-channel vulnerability (timing, cache, power-model-proxy, or decryption-failure-oracle leak) in a reference or production ML-KEM-768 implementation, within a fixed compute/time budget, at a true-positive detection rate and false-positive rate that are statistically superior (p<0.05, paired comparison on identical codebase versions) to a matched rule-based/static-audit baseline (e.g., CodeQL + ConstantTime lint rules + Valgrind ctgrind) run on the same target and budget.
- Agent finds zero true-positive side-channel vulnerabilities across all target codebases within budget, while the rule-based baseline finds ≥1.
- Agent's false-positive rate exceeds 3x the baseline's at matched true-positive rate (precision-recall curve dominated by baseline).
- Findings are reproducible only as known/published CVEs already present in the agent's training data (memorization, not discovery) — verified by checking discovery predates public disclosure or by testing on a synthetically-injected novel bug the agent could not have memorized.
- No statistically significant difference (p≥0.05, n≥30 runs) between agent and baseline on detection rate, meaning the "outperforming" claim fails even if both find bugs.
- Agent-proposed exploits fail independent verification by a human cryptography reviewer (i.e., claimed leaks are not exploitable to recover key material or reduce security margin in a PoC).
Spine & Adversarial ReadReady for validation
“This hypothesis tests whether an LLM agent that adaptively chains static analysis, fuzzing, and timing/entropy validation tools detects side-channel vulnerabilities in ML-KEM-768 implementations at a statistically higher true-positive rate than a fixed rule-based audit pipeline under identical compute and time budgets.”
- highAny 'novel' vulnerability the agent finds may simply be memorized from training data (public CVEs, GitHub issues, security blog posts about KyberSlash-class bugs), making the claim of autonomous discovery unfalsifiable without extremely careful data-contamination controls.Partially addressed via the synthetic mutation-injection targets and post-training-cutoff bug requirement in the protocol, but this EVP does not yet specify a rigorous contamination audit (e.g., checking exact-match n-gram overlap between agent output and known writeups); this must be added as a concrete pre-registered test, not left as a checkpoint alone.
- highWhy these specific tools (CodeQL, dudect, AFL++, ctgrind) and not established formal constant-time verifiers (Binsec/Rel, ct-verif, Jasmin/EasyCrypt-verified implementations) which already provide deterministic, provable guarantees for exactly this bug class? An LLM agent heuristically re-deriving what formal methods already solve soundly is a weaker contribution unless it demonstrably finds bugs those tools miss or cannot reach (e.g., due to state-space explosion) or does so faster/cheaper.Not fully resolved in this EVP. The methodology should be extended to include a direct head-to-head against at least one formal-methods tool (e.g., Binsec/Rel) on the same targets, with the success criterion reframed as 'finds bugs formal tools miss within a time budget formal tools cannot meet' rather than only comparing against a rule-based/static baseline — the current baseline choice (CodeQL+dudect+ctgrind) is reasonable as a 'typical industry audit' proxy but is not the strongest possible comparator, and this gap should be disclosed to reviewers rather than implied as fully addressed.
- mediumN=5 target codebases and 30 runs per target is a small sample for claims generalizing to 'post-quantum cryptographic implementations' broadly; statistical power to detect a moderate effect size with McNemar's test at this N may be insufficient, risking a false null or an overfit positive result to this specific codebase set.Acknowledged directly: power analysis should be run before finalizing N, and results should be explicitly scoped as applying to ML-KEM-768 C implementations of the tested style, not generalized to all PQC schemes (e.g., lattice signature schemes like ML-DSA) without separate replication, which is reflected in the UNLOCKS list as a follow-on rather than an included claim.
Experimental Protocol
Controlled comparative study, within-subject design across matched codebases:
- Select N=5 ML-KEM-768 implementation variants: (a) PQClean reference C, (b) PQClean optimized/AVX2, (c) liboqs, (d) one deliberately bug-injected variant (mutation testing: insert known leak pattern, e.g., secret-dependent branch in
poly_frommsgor non-constant-timecmov), (e) one variant with no known leaks (negative control, formally verified subset if available, e.g., HACL* / Fiat-Crypto derived). - Run agent pipeline and baseline pipeline independently on each variant, 30 trials each (varying agent temperature/seed) to estimate variance.
- Score both against a ground-truth vulnerability oracle: a manually curated, human-expert-verified list of known CVEs/leaks + the injected bug in (d) + confirmed absence in (e).
- Blind human reviewers score agent/baseline output reports for precision (is flagged leak real and exploitable) without knowing source.
- Statistical test (McNemar's test or paired bootstrap) on detection outcomes; report effect size.
- Source code corpora: PQClean (github.com/PQClean/PQClean), liboqs (github.com/open-quantum-safe/liboqs), Kyber reference implementation, BoringSSL ML-KEM module.
- CVE/vulnerability ground truth: NIST PQC forum disclosures, CVE records for Kyber/ML-KEM timing bugs (e.g., KyberSlash class bugs, 2023-2024), academic side-channel papers' reported bug locations.
- Synthetic mutation dataset: 20-30 injected bugs of known classes (non-constant-time branch, table lookup leak, faulty masking) generated via mutation-testing framework for ground-truth positive/negative controls.
- Timing measurement environment: isolated bare-metal or pinned-core VM (e.g., AWS c5.metal or dedicated lab machine),
perf/RDTSC instrumentation, dudect or ctgrind for statistical leakage detection. - Tool integrations: CodeQL/Semgrep (static analysis baseline), AFL++/libFuzzer (fuzzing), dudect (timing leakage statistical test), Valgrind/ctgrind (constant-time verification).
- LLM agent framework: GPT-4-class API or open-weight equivalent (e.g., Llama-3-70B, DeepSeek-Coder) with function-calling harness (e.g., LangChain/AutoGen-style tool orchestration).
- Agent achieves ≥70% true-positive detection rate on the combined known+injected bug set (≥14/20 bugs found across 5 targets, aggregated across 30 runs, majority-vote per target).
- Agent's precision (TP/(TP+FP)) ≥0.6, and false-positive rate ≤ baseline's false-positive rate × 1.5.
- Statistically significant improvement over baseline detection rate (McNemar's p<0.05) on at least 3 of 5 targets.
- Zero false positives on the negative-control (formally verified) target across all 30 runs (specificity requirement).
- At least one finding independently reproduced by a third-party security researcher or confirmed as a genuine novel/unpatched issue (not merely re-finding a documented CVE).
- Detection rate <40% on the combined bug set, or not statistically distinguishable from baseline (p≥0.05) on ≥4 of 5 targets.
- False-positive rate on negative control >0 in ≥3 of 30 runs (unreliable specificity).
- All "novel" findings trace to memorized public CVE text (verified via prompt-injection/knowledge-cutoff test: bug postdates model training cutoff and agent still finds it, vs. bug predates cutoff and is suspiciously verbatim-matched to public writeups).
- Cost-per-true-positive exceeds 10x the baseline's cost-per-true-positive (economically non-viable despite technical detection).
- Ablation shows entropy/fuzzing tool chaining contributes <10% marginal improvement over LLM-only static reasoning (undermines the "dynamic chaining" mechanism claim specifically).
120
GPU hours
75d
Time to result
$18,000
Min cost
$95,000
Full cost
ROI Projection
Direct applicability to security audit firms (Trail of Bits, NCC Group, Quarkslab-style services) as an augmentation tool; licensing potential to cloud providers deploying PQC in TLS stacks (AWS, Google, Cloudflare); creates a reusable agentic-security-audit framework applicable beyond PQC to any cryptographic or memory-safety-critical codebase, estimated addressable market in the crypto-audit tooling space at $50M-$150M/year given current manual audit spend industry-wide.
🔓 If proven, this unlocks
Proving this hypothesis is a prerequisite for the following downstream discoveries and applications:
- 1agentic-vulnerability-discovery-generalization-to-ML-DSA
- 2autonomous-red-team-agent-certification-framework
- 3llm-agent-assisted-formal-verification-toolchains
- 4pqc-implementation-hardening-automated-patch-generation
Implementation Sketch
class SideChannelAgent: tools = [StaticAnalyzer(codeql), Fuzzer(afl++), TimingHarness(dudect, perf_rdtsc), ConstantTimeChecker(ctgrind), PatchProposer(), ReportWriter()] def run(target_repo, budget_calls=50, budget_hours=2): state = load_codebase(target_repo) plan = LLM.generate_initial_plan(state.file_tree, prior_findings=[]) findings = [] for step in range(budget_calls): if time_exceeded(budget_hours): break action = LLM.decide_next_tool(state, plan, findings) result = execute_tool(action.tool, action.args) state = update_state(state, result) if result.is_candidate_leak: confidence = LLM.assess_confidence(result, cross_check=[ ConstantTimeChecker.verify(result.location), TimingHarness.dudect_test(result.location, n_traces=1e6) ]) if confidence > threshold: findings.append(build_finding(result, confidence)) plan = LLM.replan(state, findings) return generate_report(findings) # Baseline (non-agentic, fixed pipeline): def rule_based_audit(target_repo): static_hits = CodeQL.run(target_repo, ruleset='constant-time') fuzz_hits = AFLPlusPlus.run(target_repo, timeout=2*3600) timing_hits = dudect.run(target_repo.crypto_functions) return merge_and_dedupe([static_hits, fuzz_hits, timing_hits])
- After pilot run on 1 target (day 10): if agent produces zero valid tool calls or crashes >50% of runs due to harness integration bugs, halt and fix infrastructure before scaling.
- After negative-control test (day 20): if agent flags false positives on the formally-verified clean codebase in >20% of runs, halt — indicates fundamental precision problem not worth further compute spend.
- After memorization check (day 30): if all agent "discoveries" on known-bug targets exactly reproduce public writeup phrasing/line numbers with no independent derivation evidence in tool-call traces, halt and redesign to use only post-cutoff or synthetic bugs.
- Mid-point statistical check (day 45, ~50% of runs complete): if interim detection rate is trending <30% with narrow confidence interval, abort remaining runs to save budget (formal futility analysis, O'Brien-Fleming boundary).