Apple has released quantum-resistant cryptographic code and the mathematical verification tools used to ensure its correctness into the public domain, a move aimed at fostering broader industry adoption and independent scrutiny of these advanced security measures. This release marks a significant step in preparing digital communications for the advent of quantum computing.
The publicly available resources include implementations of the ML-KEM and ML-DSA quantum-secure algorithms. Complementing these are the formal verification libraries and tools Apple developed to validate the accuracy of the code. The company has also shared its detailed methodology for this verification process, which it claims achieves a high level of assurance for production-ready implementations of these algorithms.
Apple’s Quantum-Resistant Cryptographic Code Release
These quantum-secure algorithms are now integrated into corecrypto, Apple’s foundational cryptographic library. This library underpins the security functions across all of Apple’s operating systems, handling tasks such as encryption, decryption, hashing, and digital signatures for over 2.5 billion active devices. Apple initiated the deployment of quantum-resistant encryption within its iMessage service in 2024 and has since extended this technology to its VPN services and TLS networking protocols.
Formal Verification for Enhanced Security
A key component of the release is Apple’s Cryptol-to-Isabelle translator. This tool facilitates the conversion of cryptographic models between different formal languages, alongside the necessary supporting libraries to replicate the verification results. Formal verification employs mathematical proofs to definitively establish that code functions correctly across all conceivable inputs.
Apple utilized this approach by translating its code into Cryptol, a formal language developed by Galois. This was then further translated into Isabelle, a proof assistant originating from the University of Cambridge and The Technical University of Munich. The objective was to mathematically confirm that both implementations accurately adhered to established official standards. Apple has a history of employing Isabelle for verifying the correctness of hardware cryptographic components.
The rigorous formal verification process identified several errors that traditional testing methods might have overlooked. For instance, a crucial computational step was found to be missing in the ML-DSA code. According to Apple, this omission could have led to digital signatures being silently invalidated, potentially compromising message authenticity without users’ knowledge.
Despite the advancements provided by formal verification, Apple acknowledges that conventional testing and evaluation remain essential for comprehensive assurance. Formal verification excels at detecting errors that conventional testing, which relies on sampling numerous scenarios, cannot uncover given the vast number of potential inputs in complex cryptographic code. Subtle bugs can easily evade detection between tested cases.
However, Apple’s engineers stated that not every aspect of the code could be formally verified with the available tools. Therefore, a hybrid approach was adopted. This combines formal verification for core mathematical correctness with conventional testing for elements that formal methods could not address. The final step involves a critical evaluation of how all components interact. Apple asserts that this integrated strategy offers the most robust security for its critical cryptographic software.
“Based on our work to date, we believe that the strongest assurance possible comes from combining formal verification with conventional methods and critically evaluating the end-to-end results,” the company stated in a blog post. This highlights the layered approach to security development.
Furthermore, Apple explained its selection of ML-KEM and ML-DSA from multiple standardized quantum-resistant algorithms. The company chose these based on their superior alignment with its requirements for security, performance efficiency, and compact parameter sets. These algorithms are designed to counter the emerging threat posed by future quantum computers, which could potentially decrypt communication channels currently protected by present-day encryption standards.
Additional details regarding these releases and their implementation can be found on Apple’s corecrypto GitHub page. The availability of these tools and code is expected to accelerate the industry’s transition to quantum-resistant cryptography.

