$60 million in gold. 140 years of failures. Can AI crack the Beale Ciphers where genius cryptographers failed? The answer reveals AI’s surprising limits.
Picture this: Somewhere in the Blue Ridge Mountains of Virginia, beneath layers of soil and stone, three tons of gold, silver, and jewels allegedly rest in iron pots inside a sealed vault. The treasure’s estimated value? Over $60 million. The catch? The only way to find it is by cracking two encrypted messages that have defeated everyone who’s tried for nearly 140 years—including supercomputers, military codebreakers, and now, artificial intelligence itself.
Welcome to the maddening, magnificent enigma of the Beale Ciphers, where human obsession meets computational impossibility, and where even machine learning throws up its digital hands in surrender.
Chapter One: The Mystery That Bankrupted Dreamers
The story begins in 1822, in the sleepy town of Lynchburg, Virginia, where a dashing adventurer named Thomas J. Beale walked into the Washington Hotel. Beale was charming, mysterious, and carried himself with the confident air of a man harboring secrets. Over the winter months, innkeeper Robert Morriss got to know this enigmatic guest—but never well enough to predict what would come next.
Before departing in the spring, Beale entrusted Morriss with a locked iron box, instructing him not to open it unless Beale failed to return within ten years. Beale never returned. Twenty-three years later, consumed by curiosity and assuming his mysterious guest was dead, Morriss finally broke the lock.
Inside, he found three sheets covered in numbers—hundreds of them, arranged in seemingly random sequences. Accompanying them was a letter from Beale explaining the impossible truth: In 1817, Beale and twenty-nine companions had discovered gold and silver while hunting buffalo in the Rocky Mountains. They’d spent eighteen months mining their fortune, then transported it back to Virginia and buried it in a secret location in Bedford County. The three ciphertexts held everything: the precise location (Cipher One), an inventory of the treasure (Cipher Two), and the names of the rightful heirs (Cipher Three).
There was just one problem—or rather, three problems. The messages were encrypted using a book cipher method, where each number corresponded to a word in a specific text. Without knowing which text Beale had used as his key, the ciphers were unbreakable.
Or so it seemed.
Morriss spent twenty years of his life trying to crack the codes. He failed. Before his death in 1862, he passed the ciphers to an unnamed friend. This friend—history’s most successful Beale codebreaker—achieved what seemed like a miracle: using the Declaration of Independence as a key, he successfully decoded Cipher Two. The revealed inventory was tantalizing: “The first deposit consisted of ten hundred and fourteen pounds of gold, and thirty-eight hundred and twelve pounds of silver, deposited Nov. eighteen nineteen,” along with jewels worth $13,000 (in 1820 dollars).
This breakthrough should have been the beginning of the end of the mystery. Instead, it was just the beginning of an obsession that would consume generations.
In 1885, the friend (now believed to be James B. Ward, a local publisher) released a pamphlet titled “The Beale Papers” for 50 cents—equivalent to about $17.50 today—hoping someone, somewhere, could crack the remaining two ciphers. The Declaration of Independence, which worked for Cipher Two, failed completely on Ciphers One and Three. The treasure location and the list of heirs remained locked away in mathematical obscurity.
What followed was a cascade of human tragedy dressed as adventure. According to Peter Viemeister, a Bedford historian who documented the Beale phenomenon, “Once you get the Beale treasure in your system, it is hard to get it out. You could get possessed by it. Like drugs or gambling, it can lead a vulnerable person to stake everything on a dream.”
The obsession was real—and devastating. Stan Czanowski spent over $70,000 across seven years, using dynamite and bulldozers to excavate sections of Bedford County. In the early 1980s, one treasure hunter bankrupted himself after blasting rocks for six months, ultimately fleeing town while still owing money to the local motel. An editor at the American Cryptogram Association became so consumed by the ciphers that he neglected his work and was eventually fired. Families crumbled. Life savings evaporated. All for three sheets of numbers that refused to surrender their secrets.
The human cost of the Beale Ciphers is staggering—but it’s the computational cost that reveals just how formidable these codes really are.
Chapter Two: When the Best Minds in Cryptography Meet Their Match
By the mid-20th century, the Beale Ciphers had attracted attention from America’s cryptographic elite—the same minds that had cracked Axis codes during World War II and built the foundations of modern computer security.
Herbert O. Yardley, founder of the U.S. Cipher Bureau (known as the American Black Chamber), found himself intrigued by the Beale mystery. So did Colonel William Friedman, arguably the most dominant figure in American codebreaking during the first half of the 20th century. While leading the Signal Intelligence Service, Friedman made the Beale Ciphers part of his training program, believing them to be of “diabolical ingenuity, specifically designed to lure the unwary reader.”
Think about that for a moment. The man who helped break Japanese Purple codes during WWII—a cryptographic achievement that changed the course of history—considered the Beale Ciphers a worthy challenge for training the next generation of American codebreakers. The Friedman archive, established after his death in 1969 at the George C. Marshall Research Centre, receives frequent visitors from military historians. But according to Simon Singh, author of “The Code Book,” by far the largest number of visitors are eager Beale devotees, still hoping to find some overlooked clue in Friedman’s notes.
In 1970, hope surged when Dr. Carl Hammer, director of computer sciences at Sperry-Univac, made a startling announcement at the Third Annual Simulation Symposium in Tampa, Florida. Using a UNIVAC 1108 computer—cutting-edge technology for the era—Hammer had analyzed the Beale Ciphers and compared them to randomly generated numbers. His conclusion? The undeciphered ciphers showed non-random patterns that suggested they probably encoded intelligible text. They weren’t just gibberish. Something real was hiding in those numbers.
For the newly formed Beale Cipher Association, this was electrifying news. If patterns existed, computers could find them. The treasure hunt had entered the digital age.
Then came 1980, and everything changed.
James Gillogly, a computer scientist at the prestigious RAND Corporation and president of the American Cryptogram Association, decided to apply the Declaration of Independence (the key that had worked for Cipher Two) to Cipher One. What he discovered was both fascinating and demoralizing: buried in the decoded gibberish was an unlikely alphabetical sequence: ABFDEFGHIIJKLMMNOHPP.
Gillogly calculated the probability of such a sequence appearing randomly at roughly one in a trillion. The presence of the near-perfect alphabet (with just two letters slightly off) suggested that something deliberate lurked within the cipher. But what? Was it evidence of a secondary encryption layer? Or—as Gillogly himself suspected—was it proof that the entire thing was an elaborate hoax, with just enough “signal” embedded to keep people hooked?
Gillogly published his findings in a devastating essay titled “A Dissenting Opinion” in the journal Cryptologia. The title was polite; the message was blunt: Give up.
“Jim Gillogly’s article basically says ‘Give up,’” cryptography researcher Nick Pelling later explained. “And when one of the most respected historical codebreakers in the world says, ‘Pffft, don’t even try,’ a lot of codebreakers will say, ‘You know, I trust Jim on this one.’”
By 1999, the Beale Cipher Association had dissolved. The dream of a coordinated, professional attack on the ciphers faded. Most of the Association’s members have since died, taking with them decades of accumulated knowledge, theories, and obsession.
But here’s the twist: some researchers, including Pelling himself, believe Gillogly might have been wrong. “The presence of a pattern is presence of a signal,” Pelling insists. Rather than proof of a hoax, the “Gillogly strings” might indicate something more tantalizing—perhaps evidence of a code beneath the code, waiting to be discovered.
Which brings us to the question that defines our modern age: If the greatest human minds in cryptography couldn’t crack the Beale Ciphers, surely artificial intelligence can?
Chapter Three: When Algorithms Hit a Wall (Made of 19th-Century Paper)
In the past decade, artificial intelligence has achieved feats that would have seemed like science fiction just years earlier. Neural networks have mastered games with more possible moves than atoms in the universe. Machine learning algorithms can detect cancer in medical images with superhuman accuracy. Deep learning systems can generate photorealistic images from text descriptions, compose music, and even write convincingly human-like prose.
Given these extraordinary capabilities, it’s natural to assume that modern AI would make short work of a 19th-century treasure cipher. Natural—but wrong.
To understand why the Beale Ciphers resist even sophisticated computational attacks, we need to understand how machine learning approaches cryptanalysis—and where its limitations become insurmountable.
Modern AI-based cryptanalysis typically operates in one of several ways. In supervised learning approaches, neural networks are trained on large datasets of plaintext-ciphertext pairs, learning to recognize patterns that map encrypted data back to its original form. Researchers have achieved remarkable success with this method on simplified encryption schemes. For example, studies published in academic journals like Entropy have demonstrated that deep learning algorithms can successfully predict secret keys for reduced-round versions of modern block ciphers like Simplified DES and Simplified AES.
But here’s the critical limitation: these successes require vast amounts of training data—thousands or millions of examples showing how specific plaintexts transform into ciphertexts under various keys. For the Beale Ciphers, we have exactly one successfully decrypted message (Cipher Two) and no confirmed plaintext-ciphertext pairs for the remaining ciphers. We don’t even know with certainty which book was used as the key.
“The science of today’s cryptography may be the vulnerability of tomorrow,” noted renowned security technologist Bruce Schneier. Yet even acknowledging this principle, Schneier has been clear about the current limitations: “Anyone, from the most clueless amateur to the best cryptographer, can create an algorithm that he himself can’t break.”
The Beale Ciphers present additional challenges that confound machine learning approaches:
The Short Message Problem: Machine learning algorithms excel when they have large amounts of data to analyze. Cipher One contains 520 numbers. Cipher Three contains 618 numbers. These are incredibly short by machine learning standards. Modern neural networks typically require hundreds of thousands or millions of data points to identify meaningful patterns. With so few numbers to work with, distinguishing genuine cryptographic signal from statistical noise becomes extraordinarily difficult.
The Unknown Key Problem: Book ciphers like the Beale codes require a specific key text where each number corresponds to a word (or letter) in that text. Cipher Two used the Declaration of Independence—but which version? The pamphlet suggests an 1823 printing, but variations in word order and spelling between different editions create ambiguity. For Ciphers One and Three, we don’t even know which text to try. Over the past century, researchers have tested the U.S. Constitution, the Magna Carta, various books of the Bible, the Articles of Confederation, and countless other historical documents. None have worked.
The Potential Hoax Problem: This is perhaps the most devastating possibility of all. What if cryptographer Jim Gillogly and investigator Joe Nickell were correct in their assessments that the entire Beale story is an elaborate 19th-century literary hoax?
Nickell’s 1982 analysis in The Virginia Magazine of History and Biography presented compelling evidence that James B. Ward—the publisher of the 1885 pamphlet—was likely the author of the entire tale. Linguistic analysis revealed that the writing style of the “original” Beale letters matched Ward’s own style with suspicious precision. Moreover, Nickell discovered anachronisms: the letters supposedly written in the 1820s contained words like “stampeding” that didn’t enter common English usage until the 1840s.
If the Beale Ciphers One and Three are nonsense—deliberately constructed to look like encrypted messages but actually encoding nothing—then no amount of computational power will ever crack them. As computer scientist Malte Nuhn noted after trying machine learning approaches on the ciphers, “Maybe the algorithm is still not good enough. Or maybe it’s because there’s nothing there.”
This creates a philosophical quandary that highlights AI’s fundamental limitation: machine learning can only find patterns that exist. It cannot determine with certainty whether the absence of a pattern means the algorithm isn’t sophisticated enough, or whether there simply is no pattern to find.
Chapter Four: The Treasure That Technology Can’t Touch—And What That Means
“Machine learning models will be driving our cars, controlling our food supply, and running our financial systems,” observed Dan Boneh, professor of Computer Science and Electrical Engineering at Stanford University and co-director of the Stanford Computer Security Lab. “If you can’t trust them in adversarial settings, we’re going to have difficulty deploying them.”
Boneh’s research focuses on cryptography, adversarial machine learning, and quantum computing—the cutting edge of computational security. His observation highlights a profound truth: AI systems are extraordinarily powerful within their trained domains, but they struggle mightily when faced with true uncertainty, insufficient data, or deliberately adversarial designs.
The Beale Ciphers embody all three challenges simultaneously. We have minimal data (three short ciphertexts), profound uncertainty (unknown keys, possible hoax), and potential adversarial design (if Ward deliberately created unsolvable puzzles). It’s the perfect storm of AI limitations.
This reality forces us to confront an uncomfortable question: In our rush to apply machine learning to every problem, are we overestimating what algorithms can actually achieve?
Consider the broader implications. Modern AI systems excel at pattern recognition within well-defined problem spaces. They can identify faces, translate languages, and predict consumer behavior because they’re trained on millions of examples with clear feedback loops. But the Beale Ciphers represent a different category of problem—one with sparse data, ambiguous rules, and no verification mechanism to confirm whether a “solution” is correct.
This type of problem is more common than we might think. Historical mysteries with limited evidence. Cold cases with fragmentary clues. Scientific questions where data collection is inherently constrained by physical limitations. Financial fraud schemes designed specifically to evade pattern detection. In all these domains, the fundamental challenge isn’t computational power—it’s the absence of sufficient signal to distinguish truth from noise.
The Beale Ciphers also reveal something profound about human vs. machine intelligence. For 140 years, the mystery has attracted brilliant minds not because of the potential financial reward (though $60 million is certainly motivating), but because humans are driven by narrative, by the tantalizing possibility of being the one to solve the unsolvable. We construct elaborate theories, pursue unlikely leads, and invest ourselves emotionally in outcomes that rational analysis would suggest are hopeless.
AI systems, by contrast, are utterly pragmatic. They optimize objective functions. They follow gradients toward local minima. They don’t “care” about the treasure or the mystery—and that absence of human motivation might actually be a limitation. Some of the greatest breakthroughs in cryptanalysis have come from intuitive leaps, from researchers who pursued “unlikely” theories precisely because something felt off, or because a pattern seemed too coincidental.
The “Gillogly strings”—those nearly alphabetical sequences in Cipher One—are a perfect example. Pure statistical analysis suggests they’re too improbable to be random. Human intuition suggests they mean something. But what? Are they proof of encryption? Proof of hoax? Proof of something else entirely? No algorithm can answer these questions without additional context or validation.
Chapter Five: The Ethics of Unsolvability and the Boundaries of Knowledge
This brings us to a deeper philosophical territory: Should we even try to crack the Beale Ciphers?
On one level, the question seems absurd. Of course we should try! Scientific inquiry demands that we pursue knowledge wherever it leads. The challenge of the Beale Ciphers has advanced cryptographic understanding, pushed the boundaries of computational analysis, and demonstrated both the capabilities and limitations of our most sophisticated algorithms.
But consider the human cost. Stan Czanowski’s $70,000. The treasure hunter who bankrupted his family. The editor fired for obsession. The countless hours that brilliant cryptographers have spent chasing what might be—probably is—a ghost.
“History has taught us: never underestimate the amount of money, time, and effort someone will expend to thwart a security system,” Schneier once observed. “It’s always better to assume the worst. Assume your adversaries are better than they are. Assume science and technology will soon be able to do things they cannot yet.”
Applied to the Beale Ciphers, this wisdom cuts both ways. Yes, we should assume that future technology might crack codes that seem impossible today. But we should also assume that some mysteries might be deliberately designed to be unsolvable—and that the pursuit itself might be the trap.
There’s an ethical dimension here that’s rarely discussed in the treasure hunting community: At what point does the promise of a mystery become exploitative? If the Beale Papers were indeed a hoax designed to sell pamphlets (at 50 cents each—a significant sum in 1885), then every hour spent pursuing the treasure, every dollar invested in excavation equipment, every family torn apart by obsession, represents a continued success of that original con.
This raises uncomfortable questions about how we deploy our most powerful technologies. Machine learning requires enormous computational resources—data centers consuming megawatts of electricity, specialized hardware costing millions of dollars, expert time billed at hundreds per hour. When we point these resources at a problem like the Beale Ciphers, are we making a wise investment in advancing cryptographic understanding? Or are we essentially using 21st-century technology to chase a 19th-century lie?
The honest answer is: we don’t know. And that uncertainty itself is valuable.
Chapter Six: What the Beale Ciphers Teach Us About the Future of AI
In 2024, Dave Howard wrote in Popular Mechanics about contemporary researchers who continue working to crack the Beale Ciphers, incorporating interviews with cryptographers still pursuing the mystery. The article underscored a fascinating truth: despite 140 years of failures, despite overwhelming evidence suggesting a hoax, despite the computational verdict that these codes might be unsolvable, people continue trying.
This persistence reveals something essential about how humans interact with mystery—and how AI fits into that interaction.
Modern artificial intelligence is often presented as an omnipotent problem-solver, capable of surpassing human intelligence across virtually all domains. The Beale Ciphers serve as a humbling counterexample. They remind us that AI’s power is fundamentally bounded by the structure and availability of data. No matter how sophisticated our algorithms become, they cannot conjure information from nothing.
This limitation isn’t temporary, something that will be overcome with more computing power or cleverer architectures. It’s fundamental to how learning systems work. Machine learning is, at its core, sophisticated pattern matching. When the patterns are too sparse, too noisy, or simply absent, no amount of machine sophistication can compensate.
The future implications are profound. As we integrate AI systems into increasingly critical domains—healthcare diagnosis, financial regulation, criminal justice, infrastructure management—we must remember that these systems have blind spots. They work brilliantly within their training domains. They can even generalize reasonably well to similar situations. But when faced with truly novel scenarios, insufficient data, or deliberately adversarial designs, they can fail catastrophically—and worse, they often fail without any indication that they’re uncertain.
The Beale Ciphers also highlight the enduring value of human expertise and intuition. While AI can process vast amounts of data and identify patterns invisible to human observation, human researchers bring contextual understanding, historical knowledge, and creative reasoning that no current algorithm can match. The ideal approach to complex mysteries—whether historical codes or modern security challenges—combines human insight with computational power, rather than replacing one with the other.
Perhaps most importantly, the Beale mystery teaches us about the relationship between knowledge and value. Not all questions have answers. Not all puzzles can be solved. Not all treasures can be found. In a culture increasingly obsessed with data-driven certainty and algorithmic decision-making, there’s something almost sacred about a mystery that resists our best efforts to solve it.
The Beale Ciphers might be a hoax. They might encode real information that simply requires the right key or approach. They might represent an encryption method so sophisticated that even 19th-century creators outsmarted 21st-century algorithms. We may never know—and that uncertainty is itself a kind of treasure, one that no AI can devalue.
Epilogue: The Treasure of Not Knowing
Somewhere in Bedford County, Virginia—or perhaps nowhere at all—three tons of gold, silver, and jewels may rest in iron pots, waiting to reward whoever finally cracks the code. Sophisticated AI systems, armed with pattern recognition capabilities that would seem like magic to 19th-century cryptographers, have joined the hunt. They’ve analyzed statistical distributions, searched for linguistic patterns, tested thousands of potential keys, and applied neural networks trained on millions of examples.
And they’ve failed.
The failure isn’t a limitation of current technology that will be overcome in the next generation of AI systems. It’s a fundamental demonstration of what machine learning can and cannot do. When data is sparse, when problems are deliberately adversarial, when uncertainty dominates over signal, even our most sophisticated algorithms must admit defeat.
For those who’ve spent their lives pursuing the Beale treasure, this might sound like crushing news. But perhaps it’s actually liberating. The mystery endures not because we’re not clever enough, not because our computers aren’t powerful enough, but because some questions may be fundamentally unanswerable with the information available.
In an age where AI promises to solve every problem, optimize every process, and eliminate every uncertainty, the Beale Ciphers stand as a monument to the limits of computational thinking. They remind us that mystery, uncertainty, and the unknown are not merely gaps in our knowledge waiting to be filled—they’re fundamental features of existence that deserve respect, even reverence.
The real treasure, it turns out, isn’t buried in Virginia. It’s the lesson that even in our age of algorithmic omnipotence, some secrets refuse to be revealed. And maybe, just maybe, that’s exactly as it should be.
The Beale Ciphers remain unsolved. If you think you’ve cracked them, you’re welcome to try—but you wouldn’t be the first, and you probably won’t be the last, to discover that some mysteries are more valuable unsolved than solved.
References
- Gillogly, J. J. (1980). The Beale cipher: A dissenting opinion. Cryptologia, 4(2), 116-119. https://doi.org/10.1080/0161-118091854782
- Howard, D. (2024, November/December). The quest to break America’s most mysterious code. Popular Mechanics.
- Nickell, J. (1982). Discovered: The secret of Beale’s treasure. The Virginia Magazine of History and Biography, 90(3), 310-324.
- Singh, S. (1999). The code book: The science of secrecy from ancient Egypt to quantum cryptography. Doubleday.
- Schneier, B. (1996). Applied cryptography: Protocols, algorithms, and source code in C (2nd ed.). John Wiley & Sons.
- Schneier, B. (2000). Secrets and lies: Digital security in a networked world. Wiley.
- Alani, M. M. (2012). Neuro-cryptanalysis of DES and triple-DES. In Advances in Neural Networks (Vol. 7367, pp. 637-646). Springer. https://doi.org/10.1007/978-3-642-31346-2_71
- Benamira, A., Gerault, D., Peyrin, T., & Tan, Q. Q. (2021). A deeper look at machine learning-based cryptanalysis. Cryptology ePrint Archive, Report 2021/287. https://eprint.iacr.org/2021/287
- Chong, B. Y., Lim, J. R., & Goi, B. M. (2023). Deep-learning-based cryptanalysis of lightweight block ciphers revisited. Entropy, 25(7), 986. https://doi.org/10.3390/e25070986
- Gohr, A. (2019). Improving attacks on round-reduced Speck32/64 using deep learning. In Advances in Cryptology – CRYPTO 2019 (pp. 150-179). Springer. https://doi.org/10.1007/978-3-030-26951-7_6
- Rivest, R. L. (1993). Cryptography and machine learning. In H. Imai, R. L. Rivest, & T. Matsumoto (Eds.), Advances in Cryptology — ASIACRYPT ’91 (pp. 427-439). Springer. https://doi.org/10.1007/3-540-57332-1_36
- Viemeister, P. (1987). The Beale treasure: A history of a mystery. Hamilton’s.
- Ward, J. B. (1885). The Beale papers. Lynchburg: Virginia Job Print.
Additional Reading
- Pelling, N. (2010, June 22). Jim Gillogly’s Beale sequence revisited. Cipher Mysteries. https://ciphermysteries.com/2010/06/22/jim-gilloglys-beale-sequence-revisited
- Blackledge, J. (2020). Applications of artificial intelligence to cryptography. In Studies in Computational Intelligence (Vol. 888). Springer. https://doi.org/10.1007/978-3-030-35585-9
- Matyas, S. M., Jr. (2013). The Beale ciphers: New directions (Vols. 1-2). Lulu Press.
- Agrawal, R., Stinson, D. R., Thakur, S., & Tripathy, S. (2023). Machine learning and cryptanalysis: An in-depth exploration. Journal of Computing Theories and Applications, 1(3), 1-28.
- Schneier, B. (2021, April). The coming AI hackers. Belfer Center for Science and International Affairs. Harvard Kennedy School. https://www.belfercenter.org/publication/coming-ai-hackers
Additional Resources
- Stanford Applied Cryptography Group
Led by Prof. Dan Boneh, conducting cutting-edge research on cryptography and machine learning
https://crypto.stanford.edu/ - The American Cryptogram Association
Dedicated to the analysis and solution of ciphers since 1929
https://www.cryptogram.org/ - National Cryptologic Museum
The National Security Agency’s museum featuring historical cryptographic artifacts and the Beale Cipher archives
https://www.nsa.gov/about/cryptologic-heritage/museum/ - Cipher Mysteries
Nick Pelling’s research blog covering historical ciphers including extensive Beale Cipher analysis
https://ciphermysteries.com/ - The Bedford Museum & Genealogical Library
Houses historical records and research materials related to the Beale Ciphers and Bedford County history
201 E Main St, Bedford, VA 24523



Leave a Reply