A Formal Analysis of Apple's iMessage PQ3 Protocol
Felix Linker
34th USENIX Security Symposium (USENIX Security '25) · Day 2 · Crypto 3: Formal Methods and Private Computation
Overview
In 2024, Apple introduced iMessage PQ3, a significant evolution of its messaging protocol, heralded as the "new state-of-the-art in quantum secure messaging at scale." This talk, presented by Felix Linker, alongside his colleagues Ralph Zasa and David Basin, delves into a rigorous formal analysis of PQ3, aiming to verify Apple's ambitious security claims. The research utilizes the Tamarin Prover, a sophisticated protocol verifier, to ascertain whether iMessage PQ3 indeed delivers on its promises of secrecy, forward secrecy, post-compromise security, agreement, and replay protection against a formidable adversary, including one equipped with quantum computing capabilities.

Key moments
- 0:00 Introduction to iMessage PQ3 and its security claims
- 1:55 iMessage's strong adversary model and quantum threats
- 2:40 iMessage's hybrid approach: classical and post-quantum crypto
- 4:00 Concrete example of iMessage's double ratchet key schedule
- 6:10 The challenge of verifying unbounded looping protocols
- 6:40 Our solution: proving iMessage secure without abstractions
- 7:10 Introduction to the Tamarin Prover and its methodology
A Formal Analysis of Apple's iMessage PQ3 Protocol
Speakers: Felix Linker
Conference: USENIX Security
YouTube: https://www.youtube.com/watch?v=fZRaDAsvj_o
Overview
In 2024, Apple introduced iMessage PQ3, a significant evolution of its messaging protocol, heralded as the "new state-of-the-art in quantum secure messaging at scale." This talk, presented by Felix Linker, alongside his colleagues Ralph Zasa and David Basin, delves into a rigorous formal analysis of PQ3, aiming to verify Apple's ambitious security claims. The research utilizes the Tamarin Prover, a sophisticated protocol verifier, to ascertain whether iMessage PQ3 indeed delivers on its promises of secrecy, forward secrecy, post-compromise security, agreement, and replay protection against a formidable adversary, including one equipped with quantum computing capabilities.
The importance of this work cannot be overstated. iMessage is a widely used communication platform, and its security underpins the privacy of countless users. As the world transitions towards a post-quantum cryptographic era, the development and verification of quantum-resistant protocols are paramount. This formal analysis provides crucial independent validation of iMessage PQ3's design, offering a deep technical understanding of its mechanisms and the robustness of its security guarantees in the face of evolving threats, particularly the "harvest now, decrypt later" quantum adversary.
The research not only confirms the security of iMessage PQ3 but also pushes the boundaries of formal verification methodologies. Traditionally, unbounded looping protocols, such as those found in modern secure messaging like Signal and iMessage, have been considered beyond the scope of symbolic provers without introducing significant, potentially weakening, abstractions. Linker and his team demonstrate a novel approach that overcomes these limitations, providing a general proof methodology that allows for the formal analysis of such complex, real-world protocols without artificial restrictions, thereby expanding the applicability and utility of formal verification tools like Tamarin.
Background
▶ Watch: Introduction to iMessage PQ3 and its security claims (0:00)
iMessage was designed with a comprehensive suite of security goals in mind, extending far beyond basic message confidentiality. At its core, it aims for secrecy, ensuring that exchanged messages remain confidential. More robustly, it targets resilience against key compromise events. Should an adversary manage to learn certain session secrets, iMessage is engineered to provide forward secrecy, meaning previously exchanged messages remain confidential, and post-compromise security, allowing participants to re-establish secure communication in the future. Additionally, the protocol strives for agreement, ensuring participants confirm who they are communicating with, and replay protection, preventing messages from being maliciously re-sent.
To achieve these guarantees, iMessage PQ3 contends with a very strong adversary model. This includes an active network adversary that can control the entire network, capable of exchanging, reading, reordering, sending, and dropping any messages. Crucially, it also considers a harvest now, decrypt later adversary. This type of adversary anticipates future advancements in quantum computing, passively capturing all visible messages on the wire with the intent to decrypt them later using a sufficiently powerful quantum computer. This "passive quantum adversary" model highlights the need for post-quantum cryptographic primitives. Furthermore, the analysis accounts for an adversary capable of compromising any key by default, requiring security guarantees to hold even under such severe conditions.
iMessage PQ3 employs a hybrid approach to achieve its quantum-secure properties. It strategically combines classically secure Elliptic Curve Diffie-Hellman (ECDH) cryptography with post-quantum secure Key Encapsulation Mechanisms (KEMs). Both mechanisms are used to establish shared secrets. These shared secrets, along with a root key that maintains entropy from previous sessions, are fed into a Key Derivation Function (KDF). This KDF then generates a new root key for future sessions, as well as message keys (used for encryption) and chain keys.
The key derivation schedule is structured into two main parts:
- Public Key Ratchet: The upper portion, which utilizes public key cryptography (ECDH and KEMs) to derive shared secrets and root keys.
- Symmetric Ratchet: The lower portion, which uses symmetric encryption keys derived from previously established shared secrets and chain keys.
These two ratchets form a nested loop, closely resembling the Signal double ratchet protocol. However, a critical distinction for iMessage PQ3 is the integration of the KEMs. This integration allows iMessage PQ3, unlike classic Signal (but similar to Signal's updated post-quantum version), to provide robust post-quantum and post-compromise security guarantees. The KEM shared secrets are updated non-deterministically to save bandwidth, while ECDH shared secrets are typically updated when the conversation direction changes.
The primary challenge for the research team was that unbounded looping protocols, such as those in Signal and iMessage, are generally considered out of scope for symbolic provers like Tamarin without introducing artificial restrictions. Overcoming this limitation was a central objective, aiming to provide a general proof methodology that could analyze such complex, real-world protocols without compromising the integrity of the analysis through oversimplification.
Key Findings
▶ Watch: iMessage's hybrid approach: classical and post-quantum crypto (2:40)
The formal analysis of Apple's iMessage PQ3 protocol yielded several significant findings, validating its security claims and advancing the field of formal verification:
- iMessage PQ3 is Secure: The most critical finding is the affirmative verification that iMessage PQ3 is indeed secure and meets all its desired security guarantees. This includes secrecy (confidentiality), forward secrecy (protection of past messages after key compromise), post-compromise security (ability to recover security after key compromise), authentication (via agreement), and replay protection (via injective agreement). This provides strong independent corroboration of Apple's claims regarding the protocol's robustness against both classical and quantum adversaries.
- General Proof Methodology for Complex Protocols: The research successfully developed and demonstrated a general proof methodology that enables the Tamarin Prover to analyze complex, unbounded looping protocols like iMessage PQ3. This breakthrough overcomes a significant limitation previously associated with symbolic provers, which often struggled with the infinite state space of such protocols without requiring artificial abstractions. The methodology allows for rigorous verification without introducing simplifications beyond those inherent to the Tamarin tool itself, thus maintaining a high level of fidelity to the actual protocol design.
- Tamarin's Expanded Capability: A direct consequence of the new methodology is the demonstration that the Tamarin Prover can effectively analyze complex, real-world protocols. This expands the perceived scope and utility of formal verification tools, encouraging their use for critical cryptographic designs that were previously considered too intricate for such analysis. The successful application to iMessage PQ3 serves as a compelling case study for future protocol designs.
- Refinement of iMessage Specification: As a collaborative outcome of the formal analysis process, the researchers were able to refine the specification of iMessage slightly. This highlights a common benefit of formal verification: the detailed scrutiny required to model a protocol often uncovers ambiguities or edge cases in its original specification, leading to improvements in clarity and potentially robustness.
In essence, the work not only provides a stamp of approval for iMessage PQ3's security but also contributes significantly to the field of formal verification by showing how advanced tools can be adapted to tackle the complexities of modern cryptographic protocols.
Technical Deep Dive
▶ Watch: Concrete example of iMessage's double ratchet key schedule (4:00)
The core of this work lies in the application and extension of the Tamarin Prover for formal verification. Tamarin operates in the symbolic model, using constraint solving to prove security properties. It is designed to be both sound and complete, meaning if it finds an attack, it's a real attack, and if it fails to find one, the property is proven. Historically, Tamarin has been used to verify protocols like TLS 1.3, 5G AKA, and EMV, but iMessage PQ3 presented unique challenges due to its unbounded looping nature.
A Tamarin model consists of two main parts:
- Multi-set Rewriting Rules: These define a labeled state transition system. They model the steps taken by protocol participants, such as sending or receiving messages, deriving keys, and performing cryptographic operations. They also describe the environment in which participants operate, including initial key setups and adversary actions.
- Equation Theory: This defines the cryptographic operations available to participants and, crucially, specifies the adversary's capabilities. For instance, it defines how encryption and decryption work, how signatures are generated and verified, and what the adversary can learn or manipulate.
Linker provided examples of equations within Tamarin's theory:
- Signature Verification:
verify(sign(M, SK), M, PK) = true. This equation expresses that if a signature generated for messageMwith secret keySKis verified using the correct messageMand corresponding public keyPK, the result istrue. - Symmetric Encryption/Decryption:
decrypt(sym-enc(M, K), K) = M. This shows that decrypting a symmetric encryption of messageMwith keyKusing the correct keyKyields the original plaintextM.
The proof methodology in Tamarin follows a systematic approach:
- Define Security Property: Start with a clear statement of the security property to be proven (e.g., secrecy of a message).
- Negate Property: Negate the security property, which effectively describes a minimal counter-example or an attack scenario.
- Constraint Solving and Backward Search: Tamarin's constraint solver then attempts to instantiate this negated formula to represent a concrete, small counter-example. It performs a backward search to construct an attack trace that would lead to this counter-example.
- Proof or Attack: If Tamarin fails to construct such an attack trace, given its soundness and completeness, this constitutes a formal proof of the original security property. If it succeeds, an attack trace and concrete counter-example are identified.
The formalization of secrecy, forward secrecy, and post-compromise security for iMessage PQ3 was a central and complex task. Linker illustrated this using a generalized key schedule. The secrecy of a message encrypted under a specific message key MK_K (derived from chain keys and shared secrets) is maintained unless one of several types of compromise occurs:
- Direct Message Key Compromise: The message encryption key
MK_Kitself is directly revealed to the adversary. This trivially violates secrecy. - Chain Key Compromise: Any of the chain keys used in the derivation path of
MK_Kare compromised. - Hybrid Shared Secret Compromise: Both the KEM shared secret and the Diffie-Hellman shared secret that establish the root key from which
MK_Kis ultimately derived are compromised. This highlights the hybrid security guarantee: compromising only one type of shared secret is insufficient to break secrecy. (A footnote in the talk also mentioned that compromising a previously established root key could circumvent the need to compromise the KEM secret directly, referring to the paper for details). - Long-Term Identity Signing Key Compromise: The long-term identity signing keys of participants are compromised. Since messages in iMessage are signed, this can have devastating effects.
In the formalization, the adversary is modeled with the capability to access all keys by default, except for those specifically marked as protected (e.g., the message key, chain keys, and the shared secrets in the derivation path). This particular adversary model inherently establishes forward secrecy (because the adversary can access all keys on the "right-hand side" of the targeted message key, representing future keys) and post-compromise security (because the adversary can already compromise all keys on the "left-hand side" of the targeted message key, implying the protocol has already "healed" from past compromises).
A crucial aspect of addressing the "harvest now, decrypt later" threat is how the quantum attacker is modeled. The Tamarin formalization does not directly simulate quantum computation but rather models the quantum attacker by granting it specific capabilities. In this model, the quantum attacker can transition to a "post-quantum world" and access all non-quantum secure key material. This means that to break the secrecy of a message protected by a PQ3 KEM, the quantum attacker must repeatedly compromise the KEM shared secret itself, which they cannot do using their quantum computer against a quantum-secure KEM. This indirect modeling effectively captures the "harvest now, decrypt later" threat by ensuring that the quantum attacker gains no advantage against the post-quantum components.
The complexity of this analysis is underscored by the effort involved:
- 32 auxiliary lemmas were required to aid in the proof construction.
- Checking all proofs took approximately two days and consumed up to 140 GB of memory on a powerful machine.
- The construction of these lemmas and heuristics was estimated to take at least 2.5 person-months of work. However, the developed general proof methodology is expected to significantly accelerate future analyses of similar protocols.
Demo / Proof of Concept
▶ Watch: Our solution: proving iMessage secure without abstractions (6:40)
The talk did not include a live demonstration or a traditional proof of concept in the sense of a working exploit or a software tool. Instead, the "proof of concept" is the formal verification itself – the successful application of the Tamarin Prover to such a complex, unbounded looping protocol as iMessage PQ3. The output of the research is a rigorous mathematical proof, generated by the Tamarin Prover, confirming the security properties of the protocol under the defined adversary model.
Defensive Implications
▶ Watch: Introduction to the Tamarin Prover and its methodology (7:10)
The formal analysis of iMessage PQ3 by Linker and his team carries significant defensive implications for both Apple and the broader cybersecurity community:
- Validation of Apple's Claims: The work provides independent, rigorous validation of Apple's assertion that iMessage PQ3 is a state-of-the-art quantum-secure messaging protocol. This instills greater confidence in the security and privacy guarantees offered to iMessage users, especially in the face of future quantum computing threats. For organizations relying on iMessage for sensitive communications, this analysis reinforces its trustworthiness.
- Blueprint for Post-Quantum Migration: iMessage PQ3 serves as a concrete example of a real-world, widely deployed protocol successfully transitioning to post-quantum cryptography using a hybrid approach. This provides a valuable blueprint and validation for other developers and organizations planning their own post-quantum migrations, demonstrating the efficacy of combining established classical cryptography with new quantum-resistant primitives.
- Emphasis on Formal Verification: The successful application of the Tamarin Prover to an "unbounded looping protocol" like iMessage PQ3 highlights the critical role of formal verification in developing and deploying highly secure systems. It demonstrates that even the most complex, real-world protocols can and should be subjected to such rigorous analysis. Defenders, particularly those involved in protocol design and implementation, should consider integrating formal methods into their development lifecycle to catch subtle flaws that might be missed by traditional testing.
- Understanding Attack Vectors: The detailed formalization of secrecy identifies precise conditions under which iMessage PQ3's security could be compromised. Defenders can use this information to inform their threat modeling and incident response strategies. Knowing that the compromise of both KEM and Diffie-Hellman shared secrets (rather than just one) is required to break hybrid security, for example, provides specific targets for monitoring and protection. The identified vulnerability points, such as long-term identity signing keys, underscore the importance of robust key management practices.
- Quantum Attacker Preparedness: The modeling of the "harvest now, decrypt later" adversary and the demonstration that PQ3 withstands this threat confirms that Apple has taken a proactive stance against quantum computing. This encourages other entities to adopt similar forward-looking security postures and to invest in quantum-resistant cryptographic solutions before quantum computers become a practical threat. The specific way the quantum attacker is modeled in Tamarin (accessing all non-quantum secure key material) provides a framework for how to think about and test for this particular type of adversary.
Key Takeaways
- iMessage PQ3 is Formally Verified: The protocol is proven secure against a strong active network adversary, including a "harvest now, decrypt later" quantum adversary, confirming its claims of secrecy, forward secrecy, post-compromise security, authentication, and replay protection.
- Tamarin Prover's Expanded Capabilities: The research demonstrates that the Tamarin Prover can effectively analyze complex, unbounded looping protocols like iMessage PQ3, overcoming previous limitations and expanding the scope of formal verification tools.
- Novel Proof Methodology Developed: A general proof methodology was established for formally analyzing complex, real-world cryptographic protocols without relying on artificial abstractions, a significant advancement in the field of formal methods.
- Hybrid Cryptography Validated: The hybrid approach of combining classical Elliptic Curve Diffie-Hellman with post-quantum Key Encapsulation Mechanisms is shown to be a robust and effective strategy for achieving quantum-resistant security in practice.
- Formal Methods Refine Specifications: The rigorous process of formal analysis led to slight refinements in the official specification of iMessage, highlighting the value of such methods in improving protocol clarity and robustness.
- Specific Compromise Conditions Identified: The analysis precisely outlines the conditions under which iMessage PQ3's security properties would be violated, offering valuable insights for threat modeling and defensive strategies.
About the Speaker(s)
Felix Linker is the primary speaker for this presentation, detailing the formal analysis of Apple's iMessage PQ3 protocol. He conducted this project in collaboration with his colleagues Ralph Zasa and David Basin. The talk focuses on their collective work in applying formal verification techniques, particularly the Tamarin Prover, to a complex, real-world cryptographic protocol. While specific affiliations are not detailed in the transcript, their expertise lies in formal methods and cryptographic protocol analysis.
Reviews
Dr. Zero (Offensive Security Researcher) — STRONG ACCEPT
Rigorous formal verification of a real-world, widely-deployed PQ messaging protocol using Tamarin — and the methodological contribution of making symbolic provers tractable for unbounded looping protocols is the actual headline. This is legitimate academic security research that advances both protocol assurance and formal methods tooling simultaneously.
Heather Calloway (CISO) — WEAK
Rigorous, credible cryptographic research that confirms iMessage PQ3 does what Apple claims. The formal verification methodology is genuinely novel. But this talk never crosses into governance, institutional accountability, or operator decision-making — it validates a protocol for researchers, not for the people running security programs.
→ Top-rated talks at 34th USENIX Security Symposium (USENIX Security '25)
All talks from 34th USENIX Security Symposium (USENIX Security '25)