← Latest papers
💻 computer science

Trusting the Null: Positive-Control Fuzzing of Post-Quantum Decode and Verify Paths in Java

This paper demonstrates that while a large-scale fuzzing campaign found no defects in Bouncy Castle 1.85's post-quantum decode and verify paths, a positive-control approach successfully validated the testing harness by uncovering critical length-validation flaws in both Bouncy Castle 1.84 and multiple JDK releases, revealing that these implementations differ only in the timing of their checks rather than the logic of their decisions.

Original authors: Arpan Sharma

Published 2026-09-10
📖 7 min read🧠 Deep dive

Original authors: Arpan Sharma

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the invisible architecture of the internet, a vast system of digital locks and keys protects everything from bank accounts to private messages. For decades, these locks relied on mathematical problems that were easy to create but nearly impossible for even the most powerful computers to solve. However, scientists have long predicted that a new kind of computer, one that operates on the strange rules of quantum physics, will eventually arrive. When it does, it will be able to break those old locks in seconds. To prepare for this future, researchers are now rolling out a new generation of digital locks based on different mathematical structures that quantum computers cannot easily crack. These new systems are being adopted by governments and major technology companies to secure the internet for the coming decades.

The most critical moment in this new security system happens the very first time a computer receives a message. Before it can check if a message is genuine or unlock a secret, it must first translate a stream of raw data into a usable key or signature. This translation step is the front door of the system. If the door is poorly built, an attacker does not need to break the lock; they simply need to push the wrong shape of object against the handle. If the door accepts a malformed object, the entire system can crash, hang, or worse, be tricked into accepting a fake key. Ensuring that these front doors reject every possible bad shape is just as important as making the locks themselves unbreakable.

A recent study by independent researcher Arpan Sharma focused on exactly this front door for the new quantum-resistant systems, specifically within the Java programming language, which runs a huge portion of the world's software. The researcher tested two major implementations of these new standards: one provided by a widely used security library called Bouncy Castle, and another built directly into the Java platform itself. The goal was not to see if the math worked correctly on perfect data, but to see what happened when the software was fed millions of random, broken, and hostile inputs. The researcher wanted to know if the software would handle these bad inputs gracefully by rejecting them, or if it would stumble, crash, or silently accept a dangerous mistake.

To do this, the researcher built a testing machine that acted like a relentless, automated attacker. It generated 900,000 different variations of data, ranging from slightly altered versions of valid keys to completely nonsensical streams of bytes, and fed them into the software. The machine watched closely to see how the software reacted. It looked for any sign of a crash, any unexpected error message that the software was not supposed to show, or any instance where the software accepted a bad key as if it were good. The results for the current version of the Bouncy Castle library were remarkably clean. Out of the 900,000 attempts, the software rejected every single malformed input exactly as it was supposed to, throwing no unexpected errors and accepting no bad keys.

However, in scientific testing, a result that says "nothing went wrong" is often hard to trust. It is possible that the testing machine itself was too clumsy to find a problem, or that the software was just lucky. To prove that the test was actually capable of finding a flaw, the researcher used a clever trick called a positive control. They ran the exact same testing machine against an older version of the Bouncy Castle software that was known to have a specific, real-world flaw. In seconds, the machine found the defect. It discovered that the older software would accept a public key that was the wrong size, a mistake that could lead to a crash later in the process. Because the machine successfully found a known problem in the old version, the fact that it found nothing in the new version became a trustworthy confirmation that the new software is indeed robust.

When the researcher applied this same rigorous testing to the new quantum-resistant code built directly into the Java platform, the results revealed a different kind of issue. The Java software did not crash or accept a fake signature, which is the most dangerous outcome. Instead, it showed a subtle difference in how it handled bad data. The Java system would accept a public key of any length, even a key that was empty or far too short, without raising an alarm at the moment of entry. It would only check the size of the key later, when the key was actually used to perform a task. If the key was too small, the system would then stop and report an error. While this eventually prevented a disaster, it meant that the software had briefly held onto a broken key, treating it as valid for a short time.

This behavior was consistent across three different versions of the Java platform. The software made the same decision as the Bouncy Castle library in the end: it rejected the bad key. The difference was purely in timing. The Bouncy Castle library checked the size immediately upon receiving the key and rejected it right away. The Java platform accepted the key first, stored it, and only rejected it when it tried to use it. This distinction is important because it shows that while both systems are safe from immediate crashes, they handle the rules of entry differently. The study also highlighted a broader lesson for anyone testing this kind of complex software: sometimes, a flaw only appears when two different parts of a system interact, such as a valid signature paired with a bad key. Testing the parts in isolation often misses these hidden dangers.

The research also uncovered a hidden obstacle in the testing process itself. The computer system running the tests has a built-in feature designed to speed up operations by simplifying error messages when the same mistake happens over and over. In a massive test involving hundreds of thousands of inputs, this feature would silently strip away the details of the errors, making it impossible for the testing machine to tell if a crash was a real, unexpected failure or a known issue. The researcher had to manually disable this feature to ensure the test results were accurate. This finding suggests that for large-scale security testing of modern software, standard settings can sometimes hide the very problems researchers are trying to find.

Ultimately, this study provides a clear and verified picture of how the new quantum-resistant locks are behaving in the wild. The current version of the Bouncy Castle library appears to be highly resilient, rejecting bad inputs immediately and consistently. The Java platform is also safe, though it takes a slightly different path, holding onto bad keys for a moment before rejecting them. By using a positive control to validate the testing method, the researcher ensured that the "nothing found" result for the new software was a genuine sign of strength, not a failure of the test. As the internet prepares to switch to these new security standards, this kind of detailed, stress-tested assurance is essential to ensure that the new doors are built to withstand the push of a hostile world.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →