Claude Code found a simple recipe that rebuilds RC2's pi table exactly
RC2's 256-byte permutation table was said to come from the digits of pi, but exactly how seemed to remain a mystery. Claude Code tried several approaches and found a simple method that reproduces all 256 entries.
Done withClaude CodeSpotted· by HN user KhalidH· Nov 1, 2026
Result A clue from MD2's table led the way
“Claude attempted several different approaches and eventually, drawing on a historical clue in how the MD2's substitution table was constructed, found a surprisingly simple method that reproduces all 256 entries exactly.”
Spotted: found in the wild. Details are as reported by the source above and have not been independently verified.
What they did
After the NIST curve seed mystery was solved earlier that week, the writer had Claude Code (Opus 5.5) systematically scan old ciphers for unexplained constants and try to reverse-engineer how they were built. One was Ron Rivest’s RC2 permutation table, described as derived from the digits of pi.
How it went
Claude tried several approaches and, drawing on a historical clue in how MD2’s substitution table was built, found a surprisingly simple method that reproduces all 256 entries exactly. The writer shared the derivation and code; they couldn’t find an existing public answer, and will update if one turns up.
Try it yourself with Claude Code
Here's background on [an old cipher constant, e.g. a permutation or substitution table] that's said to be derived from [a source like digits of pi] but whose exact derivation was never published. Systematically try different construction methods, check each against the real published table, and show your reasoning for whichever one reproduces it exactly.
A starting prompt written by Agents in the Wild. Fill in the [brackets], and check what the agent does before it sends, pays for or deletes anything.
About 15k pages of discovery stood between a solo practice and a summary judgment motion. Claude ran OCR, built embeddings and search scripts, then found evidence for each assertion, with traces to check.
Before a conference with 40 people they had never met, LinkedIn research normally takes an evening. Claude Code researched the attendees in parallel via LinkedIn and Chrome MCP, producing a full briefing in 5 minutes.
Surveys, supplier risk, emissions reports, modern slavery checks: the data gathering never ends. With Claude Code they built tools that now do about 70% of it. Plus a game of Frogger, for breaks.
An image-processing problem, some sample data, and no one at the keyboard. Claude Code iterated, looking at the output image, until it fixed it. It spent at least an hour, untouched.
A 35,000-line PyQt desktop app for electrical engineering design had taken maybe 2500 hours over some years. Running OpenClaw on top of Claude Code, a two-sentence prompt converted it to a web app overnight.