DEV Community

Cover image for AI Cracked a 370-Year-Old Cipher in 40 Minutes — Here's How to Unlock the Same Reasoning Power
xiaoru chen
xiaoru chen

Posted on Originally published at github.com

AI Cracked a 370-Year-Old Cipher in 40 Minutes — Here's How to Unlock the Same Reasoning Power

AI cracked 370-year cipher

The story that broke HN yesterday

Claude Fable 5.1 cracked the Cyphral Distich — a cipher that's been unsolved since the 1650s. 370 years of human failure. 40 minutes of AI reasoning. 471 points, 200 comments on Hacker News.

Everyone's talking about how smart AI is getting. But here's what actually hit me: I use AI every single day, and it has never shown me anything close to this level of reasoning.

Then I realized why. It's not the model. It's the mode.

The switch most people never flip

Normal vs Deep Reasoning

Most of us interact with LLMs in "chat mode" — ask a question, get an answer. Fast, shallow, template-shaped.

But modern reasoning models support a thinking mode: before producing output, the model spends thousands of tokens internally analyzing, hypothesizing, verifying, eliminating, and re-reasoning. Only then does it give you the final answer.

Fable didn't "guess" the cipher. It ran a multi-step reasoning chain: frequency analysis → hypothesis generation → verification → elimination → narrowing.

I've been using the Bailian CLI (bl), which exposes this as a single flag:

bl text chat --message "Analyze the logical flaws in this argument" --model qwen3.8-max --enable-thinking --thinking-budget 8192
Enter fullscreen mode Exit fullscreen mode

That's it. --enable-thinking flips the switch. --thinking-budget controls how deep it goes. Install notes live on the CLI page; you create the key in the console — new accounts get free credits, and the official docs are authoritative for command syntax.

Three real tests

Contract risk analysis

Fed it a 100-page commercial contract.

  • Normal mode: 5 risks (all obvious — liability, IP ownership, confidentiality)
  • Thinking mode: 11 risks. The extra 6 included an exclusivity clause buried in Appendix 3 that contradicted Section 7, a conditional auto-renewal trigger, and a cross-border data transfer clause with GDPR implications.

A lawyer friend confirmed the 3 hidden ones were "definitely worth flagging."

Sales anomaly diagnosis

Q3 revenue dropped 15%.

  • Normal mode: "Possibly seasonal. Compare with last year."
  • Thinking mode: Decomposed channel mix → ASP trends → repurchase rate → CAC → competitor moves. Final answer: a client representing 20% of revenue shifted from quarterly to semi-annual procurement. Q3 was the gap.

Sales team confirmed. Correct.

Production bug root cause

Intermittent 500s. Logs only showed "unexpected EOF."

  • Normal mode: Listed 6 generic possibilities.
  • Thinking mode: Analyzed all 6, eliminated 4 with specific reasoning, ranked the remaining 2 by probability, and gave verification steps for each. It was #2: a connection pool race condition under specific concurrency patterns.

Chaining reasoning with pipeline

bl pipeline reasoning workflow

Single-step thinking is powerful. Multi-step orchestration is where it gets interesting.

bl pipeline is a local workflow engine. You define steps in YAML with dependency edges:

version: workflow/v1
steps:
  - id: analyze
    type: text/chat
    input:
      message: "Analyze character frequency distribution in this cipher text"
      model: qwen3.8-max

  - id: hypothesize
    type: text/chat
    dependsOn: [analyze]
    input:
      message: "Based on the frequency analysis, list the 3 most likely encryption methods"
      model: qwen3.8-max

  - id: verify
    type: text/chat
    dependsOn: [hypothesize]
    input:
      message: "Attempt to decrypt the first 20 characters using each hypothesis"
      model: qwen3.8-max
Enter fullscreen mode Exit fullscreen mode
bl pipeline validate --file cipher.yaml
bl pipeline run --file cipher.yaml --dry-run
Enter fullscreen mode Exit fullscreen mode

11 step types available: text/chat, vision/describe, image/generate, image/edit, video/generate, speech/synthesize, speech/recognize, script/js, logic/switch, logic/select, logic/assert.

The engine does topological sorting, supports --concurrency N for parallel execution, and streams lifecycle events via --events jsonl.

Grounding reasoning with knowledge

Fable didn't crack the cipher from thin air. It had deep reasoning plus extensive cryptography knowledge.

bl knowledge gives you the second half:

bl knowledge create --name "cipher-history"
bl knowledge doc upload --file ./papers/ --index-id <id> --wait
bl knowledge chat --message "What encryption methods were common in 17th century Europe?" --agent-id <service-id>
Enter fullscreen mode Exit fullscreen mode

Upload your docs once. Every subsequent reasoning call can retrieve from them via semantic search (text-embedding-v4, 512 dims).

The numbers

Model Input Output (incl. thinking tokens)
qwen3.8-max ¥12/M tokens (~$1.70) ¥36/M tokens (~$5.10)
qwq-plus ¥2/M tokens (~$0.28) ¥8/M tokens (~$1.13)

One deep reasoning call (budget 8192) ≈ ¥0.3-0.8 (~$0.04-0.11). New users get free credits covering all experiments in this post.

What this isn't

This isn't "AI replaces humans." Fable cracked a cipher because it could sustain deep reasoning across a massive search space without fatigue — something no single human can do in one sitting.

But you don't need to crack 370-year-old ciphers. You might need to analyze a 200-page contract, locate an intermittent bug, diagnose a revenue drop, or find the root cause of an architecture problem.

Same capability. Different search space.

The switch is one flag away.

npm install bailian-cli
bl auth login --api-key <your-key>
bl text chat --message "the problem you've been stuck on" --enable-thinking --thinking-budget 8192
Enter fullscreen mode Exit fullscreen mode

Try it.

Top comments (0)