Published on

Kryptos K4 Cracked After 30 Years

Authors

Kryptos K4 Solved: Matt Klepp’s Breakthrough

Kryptos K4

Back on July 29, I wrote about Kryptos K1, the first of four encrypted passages carved into the copper sculpture sitting quietly in the CIA’s courtyard since 1990. That post explored how K1 was cracked using a classic Vigenère cipher — and included a C# implementation of the decryption.

At the time, K4 — the fourth and final part of the sculpture — remained unsolved, holding its place as one of the world’s most enduring cryptographic mysteries.

That didn’t last long.

Just weeks later, two major developments surfaced almost simultaneously:

  • Jim Sanborn, the artist behind Kryptos, announced he would auction off the K4 solution.
  • And Matt Klepp quietly published what appears to be the first complete and technically sound decryption of K4, backed by data, code, and validation — all publicly accessible on GitHub.

Matt Klepp’s Solution to K4

Shortly after I posted my K1 write-up, Matt commented on my LinkedIn post with a link to his project. That link led to this GitHub repository, which contains a full cryptanalytic pipeline — from initial pattern detection to machine learning inference and constraint validation.

Here’s the raw decrypted ciphertext from his solution:

UDILKAFSGDMZLYQJCVNJAEASTNORTHEASTOPOHAYLOMIQSDZSSHTQNSXYMEMNBTBERLINCLOCKSYRUFZRDSPQKKQZIKAGIWQD

It might look abstract, but embedded inside are unmistakable signal phrases: EAST, NORTHEAST, BERLIN, CLOCK — not only clues, but the exact regional groupings Matt used to tune his solver with local corrections.

This isn’t speculative plaintext retrofitting — it’s a forward-built decryption aligned with all 24 confirmed character positions revealed by Sanborn and the CIA over the years.

A Technical Breakdown

Matt’s approach is modular, layered, and methodical. Here’s a high-level summary:

1. Statistical Foundations

He began with classical analysis — entropy, frequency distribution, and the Index of Coincidence — to test for structure. That led to the discovery of a base formula:

(4 × position + 20) mod 26

This alone decoded around 29 percent of the confirmed plaintext.

2. Machine Learning Layer

Matt engineered 52 features per character — including position, modular patterns, and trigonometric transformations — then trained a neural network to predict likely character shifts. This boosted the match rate to 11 of the 24 known values.

3. Constraint Satisfaction

Using a backtracking solver, he fixed the 24 known plaintext characters as constraints and explored viable solutions that respected them. This improved accuracy to approximately 50 percent.

4. Region-Based Corrections

This is where things clicked. He split the ciphertext into cryptographically distinct regions — EAST, NORTHEAST, BERLIN, and CLOCK — then applied small additive corrections unique to each segment.

The result: full alignment with all confirmed plaintext positions.

Final Thoughts

We’re still waiting for Jim Sanborn to confirm or comment on Matt Klepp’s solution. Until then, this stands as the most detailed and technically sound public decryption of K4 available.

From a software engineering standpoint, the project is fascinating — blending cryptanalysis, algorithm design, machine learning, and region-specific logic. While Matt’s repository is released under a license that prohibits reproduction, I may explore certain aspects of the technical approach in a future post, purely from an engineering and problem-solving angle.

Explore Matt’s GitHub repository
Original Kryptos K1 article

Attribution: Kryptos K4 solution methodology by Matthew D. Klepp (2025)