Next Article in Journal
Study on Molybdenum–Rhenium Alloy Ultrasonic Resonance Temperature Sensor
Previous Article in Journal
Tex-Crete—Carbon and Cost Assessment of Concrete with Textile and Carboard Fibres—Case Studies Towards Circular Economy
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Formal Analysis of Ratchet Protocols Based on Logic of Events

1
School of Information and Software Engineering, East China Jiaotong University, Nanchang 330013, China
2
School of Software Engineering, Jiangxi University of Software Professional Technology, Nanchang 330041, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(13), 6964; https://doi.org/10.3390/app15136964
Submission received: 7 May 2025 / Revised: 11 June 2025 / Accepted: 12 June 2025 / Published: 20 June 2025

Abstract

Ratchet protocols are a class of secure protocols based on ratcheting encryption mechanisms, widely employed in instant messaging. Against the backdrop of frequent incidents of communication privacy breaches, ratchet protocols have become a vital technology for ensuring secure end-to-end communication. This paper presents a formal analysis framework for ratchet protocols grounded in Logic of Events theory (LoET). We further extend LoET by introducing dedicated Diffie–Hellman (DH) and ratchet event classes, along with tailored axioms and inference rules, to support precise modeling of ratcheted encryption. Using the Signal protocol as a case study, we construct a bidirectional authentication model and rigorously prove that both its symmetric and asymmetric ratchet phases satisfy strong authentication properties. Compared with existing formal approaches, our method enables more expressive modeling of key update sequences and supports structured reasoning over causality and authentication flows. The proposed framework lays a theoretical foundation for analyzing the security of modern ratcheted protocols and holds potential for future automated verification.

1. Introduction

Ratchet protocols are a class of security protocols designed to enhance communication security [1]. The core principle of the ratchet mechanism lies in dynamically updating keys to achieve forward secrecy [2,3] and backward secrecy [4]. It is widely adopted in instant messaging [5] (for example, Signal protocol, WhatsApp [6]), end-to-end encryption (E2EE) [7,8], and key exchange [9], among other domains. For example, Signal [10] provides E2EE for numerous instant messaging platforms such as WhatsApp, Wire, and Facebook Messenger, serving over 1 billion active users. In the midst of growing concerns about communication privacy breaches [11], the Signal protocol leverages X3DH (Extended Triple Diffie–Hellman) [12] and the double ratchet encryption technique [13] to provide robust security properties. These mechanisms ensure that even if a key is compromised, past and future messages remain protected.
Off-the-Record (OTR) [14] was one of the earliest secure messaging protocols. It employs a Diffie–Hellman ratchet, generating a new ephemeral shared key with each message exchange. Since past messages cannot be decrypted from subsequent states, this technique is referred to as a ratchet mechanism. Ratchet protocols are broadly categorized into unidirectional (single) and bidirectional (double) ratchets [15]. A unidirectional ratchet—such as the KDF-based ratchet [16]—updates keys in only one direction. In contrast, a bidirectional ratchet combines a KDF ratchet and a Diffie–Hellman ratchet to achieve both forward and backward secrecy, thereby offering stronger security guarantees.The evolution of ratchet structures has been complex. For instance, TextSecure [17], the predecessor of Signal, was the first to formalize the double ratchet mechanism by integrating both a symmetric-key ratchet and an asymmetric Diffie–Hellman ratchet. a In recent years, the security of ratchet protocols and their associated mechanisms has been extensively studied. Frosch et al. [18] conducted a security analysis of TextSecure v3, demonstrating that, in their model, the long-term symmetric keys used to initialize the ratchet mechanism form a secure one-round key exchange protocol. However, their analysis did not address the security properties of the ratchet mechanism itself. Cohn-Gordon et al. [19] proposed a formal security analysis framework capable of capturing ratchet structures. Building on this, they introduced the asynchronous ratcheting tree (ART) design method to achieve stronger security guarantees. Meanwhile, Bellare et al. [20] formally defined security properties for ratchet mechanisms and presented a provably secure ratcheted key exchange protocol, demonstrating how to model the characteristics of ratchet encryption.Further advancing the field, Beguinet et al. [21] employed the Tamarin prover to formally model and verify the Signal protocol, including its ratchet-based components. Additionally, Li et al. [22] developed a formal security analysis of the Signal protocol using Logic of Events theory, providing rigorous proofs for the security of its ratchet mechanism.
These studies have provided in-depth analyses and improvements of ratchet protocols and their associated mechanisms from various angles, including key exchange, ratchet operations, and formal verification [23,24]. Collectively, they have laid a solid theoretical foundation for ensuring the security and robustness of ratchet-based communication protocols.
Logic of Events theory (LoET) [25,26] is a theorem-proving approach frequently employed for analyzing the security of distributed systems. In response to the limitations of Protocol Composition Logic (PCL) [27], Xiao et al. made significant theoretical advancements by applying LoET to security protocol analysis. Their work substantially expanded the theoretical framework of LoET, enabling it to support the formal verification of security protocols across multiple domains. These innovations have reinforced LoET’s influence in formal methods research while providing a powerful analytical tool for verifying the security of complex systems.
LoET employs events to characterize system behaviors and security properties. By formally modeling protocol executions or specifying desired security goals, LoET enables rigorous verification of whether these properties hold within the protocol model. This approach offers unique advantages in detecting subtle vulnerabilities that may be overlooked by other analysis methods.
In this study, we conduct a formal analysis of the ratchet mechanism in the Signal protocol to identify potential vulnerabilities and ensure the security of Signal message exchanges. Our principal contributions are as follows:
  • A formal analysis framework for ratchet protocols based on LoET. We extend the LoET event class system by introducing DH (Diffie–Hellman) and ratchet event classes and by developing dedicated axioms and inference rules tailored to the characteristics of ratchet protocols. This framework addresses the limitations of conventional formal methods in accurately modeling ratchet-based encryption mechanisms.
  • Construction of a bidirectional authentication formal model for the Signal protocol. To capture the dynamic nature of ratchet encryption, we abstract its key negotiation and update processes. By integrating LoET, we formally define the security properties of protocol interactions, precisely characterizing the requirements for bidirectional authentication.
  • Formal verification of strong authentication properties in the Signal protocol. Leveraging our extended LoET rules, we rigorously prove the strong authentication properties of the ratchet mechanism in message exchange scenarios. This work also extends the applicability of LoET to the analysis of ratchet protocols.
The remainder of this paper is organized as follows: Section 2 introduces the Logic of Events theory (LoET) and its extensions developed for the formal analysis of ratchet protocols. Section 3 presents a formal analysis of the Signal protocol, including an overview of the protocol and its formal verification framework, followed by a detailed exposition and proof of its strong authentication properties based on LoET. Section 4 presents a comparison between our approach and existing methods. Section 5 summarizes the main conclusions of this study and offers suggestions for future research directions.
In addition, several studies have conducted formal verification of the Signal protocol in depth. Tools such as CryptoVerif [28] and Verifpal [29], provide automated protocol analysis capabilities, enabling the modeling of complex cryptographic mechanisms and potential attack vectors. These tools are particularly well-suited for evaluating the security of ratchet-based protocols like Signal. Furthermore, closely related to our work, OSM [30] proposes a model-checking framework based on structured event tracing, which allows for dynamic observation of protocol behavior in aspect-oriented programming systems. This approach aligns well with the event-driven modeling strategy employed by LoET. Additionally, BlockASP [31] extends model-checking techniques for security protocols by emphasizing semantic cleanliness, which plays a critical role in verifying the security of key materials and the integrity of protocol state transitions. These frameworks complement our approach and highlight the broader applicability of event-based formal verification.

2. Logic of Events Theory

The Logic of Events theory (LoET) is a formal verification method that models protocols or specifies their required properties to determine whether these properties hold within the protocol model. It helps identify security vulnerabilities that are difficult to detect using other approaches. LoET defines core elements such as identifiers, atoms, and unpredictable data (e.g., nonce, signature, ciphertext, and encryption key), as well as event, event class, and event structure. These components support the construction of authentication theories used to prove strong authentication properties in security protocols.

2.1. Notation

The basic notations and semantics used throughout our formal model are summarized in Table 1, including representative examples to aid clarity.

2.2. Fundamental Concepts

In the Logic of Events Theory (LoET), protocol interactions are modeled as threads—ordered sequences of actions performed by protocol participants—and matching relations that capture both message consistency and causal dependencies. The definitions that follow formalize these concepts using set theory and first-order logic, with relevant terms introduced below.
  • Act List: t h r is an action list (Act List), representing a sequence of protocol actions (such as Send, Receive, Encrypt, etc.) executed by a single participant. The condition i : thr [ i ] < loc thr [ i + 1 ] indicates that the events in this list are arranged in order, i.e., local causal ordering holds: each preceding event occurs before the next one and all events belong to the same participant’s thread.
  • Thread (Thread): An ordered sequence of events executed by a single principal, satisfying intra-participant causal ordering e i < loc e i + 1 .
  • Weak Match ( s r ): The send and receive events contain identical message content ( Send ( s ) = Rcv ( r ) ), without requiring causal order.
  • Strong Match ( s r ): A weak match that additionally satisfies causal precedence ( s < r ), ensuring the chronological execution of the events.

2.2.1. Threads and Matching Sessions

Equation (1) formally defines a thread (thr) as an Act List—an ordered list of protocol actions such as Send, Receive, and Encrypt—executed sequentially by a single protocol participant, preserving local causal ordering.
Thread def thr : Act List | i : thr [ i ] < loc thr [ i + 1 ]
If there exist two messages s and r, such that the first message s is a message on a send event and the second message r is a message on a receive event with consistent information, then s and r are considered to be weakly matched and denoted as s r . If s precedes r and there is a direct causal relationship, a strong match s r is formed.The concepts of weak match and strong match are formally captured in Equation (2).
s r def s E ( Send ) r E ( Rcv ) Send ( s ) = Rcv ( r ) s r def s r s < r
If two threads th 1 and th 2 each contain at least n messages, and the first n messages of the two threads match each other such that each message pair m 1 , m 2 satisfies m 1 m 2 m 2 m 1 , then threads thr 1 and thr 2 constitute a matching session of length n. Moreover, if this matching session can be further subdivided into a strong matching session, it is denoted as thr 1 n thr 2 .

2.2.2. Strong Authentication Properties of Protocols

Principals Alice and Bob (hereafter referred to as A and B) are both honest participants who abide by the agreement. Principal A initiates a sequence of conversations, and Principal B responds with a corresponding sequence of replies, forming a legally matching session. If Principal B completes an instance of the full reply sequence, then a matching session exists with Principal A—meaning the content of the received messages matches the corresponding sent messages. Both parties complete identity authentication, ensuring that no attacker can launch a camouflage session attack using previously intercepted messages. The matching session process satisfies the strong matching property. The basic sequence b s in protocol P r authenticates n messages, and the authentication process satisfies the Equation (3)
P r auth ( b s , n ) def A , B . thr 1 . Honest ( A ) Honest ( B ) P r ( A ) P r ( B ) A B l o c ( thr 1 ) = A b s ( A , B , thr 1 ) thr 2 . l o c ( thr 2 ) = B thr 1 n thr 2

2.2.3. Axioms of the Logic of Events Theory

Key Axiom: The Key Axiom (AxiomK) is symmetric, the symmetric key corresponds uniquely to the principal that holds it. The key material is unique to each principal; different principals cannot share the same private key. Moreover, the private key held by principal A can only correspond to its own public key, as shown below
AxiomK : A , B : Id . k , k : Key . a : Atom . M a t c h i n g K e y s ( k , k ) M a t c h i n g K e y s ( k , k ) M a t c h i n g K e y s ( Symm ( a ) , k ) k = Symm ( a ) M a t c h i n g K e y s ( PrivKey ( A ) , k ) k = A M a t c h i n g K e y s ( A , k ) k = PrivKey ( A ) Privkey ( A ) = Privkey ( B ) A = B
Honest Axiom: LoET includes the Honest function to assert the honesty of a principal. An honest principal does not disclose its private key during protocol interactions. Furthermore, all encryption, decryption, and signature events are assumed to occur on honest principals. The Honest Axiom (AxiomS) characterizes the behavior of trustworthy signers as follows:
AxiomS : A : Id . s : E ( sign ) . e : E ( Encrypt ) . d : E ( Decrypt ) . Honest ( A ) signer ( s ) = A ( loc ( s ) = A ) key ( e ) = PrivateKey ( A ) ( loc ( e ) = A ) key ( d ) = PrivateKey ( A ) ( loc ( d ) = A )
Flow Relation Axiom: Flow Relation is a correlation between events in a causal order of a random number. The flow of atom a from action e 1 to action e 2 is described e 1 a e 2 , there are three scenarios. The first case is that atom a from e 1 and e 2 are located in the same body; the second case is when there are send and receive events, and a is sent in clear text; in the third case, a is located in the plaintext of the encryption event and flows with the ciphertext to the matching decryption event. Streaming relational recursion is defined as follows:
e 1 a e 2 def e 1 h a s a e 2 h a s a e 1 loc e 2 s : E ( Send ) . r : E ( Rcv ) . e 1 s < r e 2 S e n d ( s ) = Rcv ( r ) e 1 a s r a e 2 e : E ( Encrypt ) . d : E ( Decrypt ) . e 1 e < d e 2 DEMatch ( d , e ) key ( d ) Symm ( a ) e 1 a e ciphertext d d a e 2
The Flow Relation is the association between random number causal events, and the axiom of random numbers is denoted as AxiomF , which contains three parts, namely, AxiomF 1 , AxiomF 2 , and AxiomF 3 , which are defined as follows:
e 1 a e 2 e 1 e 2 e 2 has a release ( a , e 1 , e 2 ) AxiomF 1 : e 1 : E ( new ) . e 2 : E . has New ( e 1 ) e 1 New ( e 1 ) e 2 AxiomF 2 : e 1 : E ( Sign ) . e 2 : E . e 2 has signature ( e 1 ) e : E ( Sign ) . Sign ( e ) = Sign ( e 1 ) e signature ( e 1 ) e 2 AxiomF 3 : e 1 : E ( Encrypt ) . e 2 : E . e 2 has signature ( e 1 ) e : E ( Encrypt ) . Encrypt ( e ) = Encrypt ( e 1 ) e signature ( e 1 ) e 2
Axiom F1 is about the nature of streams, and Axiom F2 and Axiom F3 introduce signature, ciphertext, and the relationship between the two types of events, and if an action contains a signature or ciphertext, some signatures or encryption actions with the same information can be inferred.

2.3. Logic of Event Theory Extensions

Overview of X3DH in the Signal Protocol [10]. To help readers better understand the following extensions of the Logic of Events theory (LoET), we briefly introduce the communication mechanism adopted by the Signal protocol, especially the Extended Triple Diffie–Hellman (X3DH) key agreement scheme. X3DH allows two communicating parties (typically an initiator and a responder) to establish a shared root key in an asynchronous setting. The initiator combines three types of public keys from the responder—an identity key, a signed prekey, and a one-time prekey—along with its own ephemeral key to perform a series of Diffie–Hellman operations, thereby generating a shared secret. This shared secret is then used to initialize the double ratchet mechanism, which drives subsequent encrypted communications. By incorporating both long-term and ephemeral keys, X3DH achieves forward secrecy and authentication, laying the theoretical foundation for modeling key evolution using LoET. For a complete description of the Signal protocol’s interaction flow and ratchet mechanism, please refer to Section 3.

2.3.1. Event Class Extension

LoET classifies protocols through events. The authentication protocol involves seven types of events: the generation of challenge numbers, message sending, receiving, signing, verification, encryption, and decryption. The formal definition based on these seven event types is as follows:
New : E C l a s s ( Atom ) Send , Rcv : E C l a s s ( Data ) Encrypt , Decrypt : E C l a s s ( Data × key × Atom ) Sign , Verify : E C l a s s ( Data × Id × Atom )
However, these events do not cover all protocol operations, including those involved in the ratchet encryption mechanism. We extend the event class by introducing new types—DH and ratchet—to more effectively model ratchet encryption. These extensions provide an abstract and precise formal description of ratchet protocols, defined as follows:
DH : E C l a s s ( Data × Key × Atom ) Ratchet : E C l a s s ( Data × Key × Atom )
If there exists an event e 1 E ( DH ) , then the principal A performs a series of computations within e 1 to generate an initial symmetric encryption key for future long-term message sessions. If there exists an event e 2 E ( Ratchet ) , then the principal B updates the ratchet key to generate a new temporary ratchet key.

2.3.2. Related Axiomatic Extension

In the Logic of Events, the causal axioms include the Receive Axiom ( AxiomR ), the Verify Axiom ( AxiomV ), and the Decrypt Axiom ( AxiomD ). These three axioms associate the event classes Rcv , Verify , and Decrypt with their causally related counterparts Send , Sign , and Encrypt , respectively. Among them, AxiomR and AxiomV are structurally similar, both describing the matchability of protocol behaviors—that is, any receive event or signature verification event must be preceded by a corresponding send or signing event, with identical message content. AxiomD introduces the element of the key, asserting that the decryption event corresponds to an encryption event with both matching content and matching key. The formal definitions are as follows:
AxiomR : e : E ( Rcv ) e : E ( Send ) . ( e < e ) Rcv ( e ) = Send ( e ) AxiomV : e : E ( Verify ) e : E ( Sign ) . ( e < e ) Verify ( e ) = Sign ( e ) AxiomD : e : E ( Decrypt ) e : E ( Encrypt ) . e < e DEMatch ( e , e ) DEMatch ( e , e ) def plaintext ( e ) = plaintext ( e ) ciphertext ( e ) = ciphertext ( e ) MatchingKeys ( key ( e ) , key ( e ) )
To introduce DH and ratchet events, the causal axiom needs to be extended. The extended axiom is denoted as AxiomE. It stipulates that, in the sequence of these two types of events, a corresponding DH event must occur before the ratchet event. The two events are causally related and share relevant information content. In addition, the keys involved must also be match-associated. The formal definition of AxiomE is given as follows:
AxiomE : e : E ( Ratchet ) e : E ( DH ) . ( e < e ) Ratchet ( e ) = DH ( e ) RDMatch ( e , e ) def plaintext ( e ) = plaintext ( e ) ciphertext ( e ) = ciphertext ( e ) MatchingKeys ( key ( e ) , key ( e ) )
To ensure the soundness of AxiomE, we clarify that the relation RDMatch(e, e’)—which links a ratchet event to a prior DH event—is assumed to be injective. That is, for every ratchet event, there exists at most one DH event such that RDMatch holds. This uniqueness is guaranteed by the local causal ordering in LoET and the protocol design of Signal, where each DH operation generates a fresh ephemeral key used exactly once. Therefore, ambiguity is avoided even in long sessions.
In asynchronous environments such as message delay, loss, or replay, RDMatch remains valid based on symbolic causality. A ratchet event must be causally linked to a verifiable prior DH event. Messages that lack this linkage are considered invalid and excluded from the protocol trace, thus ensuring the correctness of AxiomE even under adversarial or unreliable conditions.

2.3.3. Rule Extension

In LoET, the definition of has appears in the stream relationship. The Act class contains seven basic events, which are referred to as actions. The expression e has a is true only if the action e contains the atom a. Therefore, it should be expanded after introducing new events DH and ratchet, and the formally defined Rule after the expansion is as follows:
Rule : e has a def ( e E ( New ) New ( e ) has a ) ( e E ( Send ) Send ( e ) has a ) ( e E ( Rcv ) Rcv ( e ) has a ) ( e E ( Encrypt ) Encrypt ( e ) has a ) ( e E ( Decrypt ) Decrypt ( e ) has a ) ( e E ( Sign ) Sign ( e ) has a ) ( e E ( Verify ) Verify ( e ) has a ) ( e E ( DH ) DH ( e ) has a ) ( e E ( Ratchet ) Ratchet ( e ) has a )
The Equation (12) only describes the protocol actions or the ownership of all atoms in a single operation, without distinguishing specific types of information. During the proof process, distinguishing information content—such as differentiating between plaintext and keys—can help more accurately verify causal relationships between events. Therefore, we propose extending Rule 1 , Rule 2 , and Rule 3 to account for these cases.
As shown in Equation (13), Rule1 can combine and split information—including plaintext, ciphertext, and keys—which facilitates the distinction, transmission, and reception of information.
Rule 1 : e : E ( New ) E ( Send ) E ( Rcv ) E ( Encrypt ) E ( Decrypt ) E ( Sign ) E ( Verify ) E ( DH ) E ( Ratchet ) . ( ( e has ( plaintext ( e ) , K ) ) ( e has plaintext ( e ) ) ( e has K ) ) ( ( e has ( ciphertext ( e ) , K ) ) ( e has ciphertext ( e ) ) ( e has K ) )
As shown in Equation (14), Rule2 operates under the assumption that event e possesses both the plaintext and the corresponding key K, and that K is valid and usable at e, which allows encrypting plaintext or decrypting ciphertext when the corresponding key is held, thereby obtaining the information content and ensuring that the information is clearer and more accurate.
Rule 2 : e : E ( Encrypt ) E ( Decrypt ) E ( DH ) E ( Ratchet ) ( ( e has plaintext ( e ) , K ) e has ciphertext ( e ) ) ( ( e has ciphertext ( e ) , K ) e has plaintext ( e ) )
As shown in Equation (15), Rule3 introduces the concept of Clean , based on the has rule. The Clean predicate provides a formal method for accurately describing the security conditions of keys. Incorporating Clean predicates into the Logic of Events theory ( LoET ) can enhance its ability to describe and reason about security protocols, especially those involving key management.
Rule 3 ( definition of Clean ) : ( ( DH ( e 0 ) = a Clean ( e 0 , a ) ) ( Ratchet ( e 1 ) = a Clean ( e 1 , a ) ) ( A : Id . e 2 : E ( DH ) E ( Ratchet ) . e 3 : E 1 , e 4 : E 2 . loc ( e 2 ) = loc ( e 3 ) = loc ( e 4 ) = A e 2 < e 3 < e 4 E 2 ( e 4 ) has a ¬ ( send ( e 3 ) has a ) ¬ ( e 3 = E ( send ) ) Clean ( e 4 , a ) )
The predicate Clean(e, a) indicates that the atom a has not been exposed before event e, thereby ensuring its security within the symbolic event sequence. Specifically, Clean(e, a) holds if the following two conditions are satisfied:
  • Prior to event e, all events executed by the same participant (loc(e)) must not include atom a in any attacker-observable operation, such as Send, Rcv, or unprotected Encrypt. This condition can be verified using the extended has rule in combination with the local order relation ( < loc ).
  • The occurrence of a in event e must originate from secure events (e.g., DH or ratchet) and must not be derivable from any previously exposed message. This corresponds to the flow relation defined in AxiomF.
Therefore, verifying Clean(e, a) essentially involves checking whether atom a has already been transmitted or leaked through any symbolic path before event e.

3. Formal Analysis of the Signal Protocol

3.1. Overview of the Signal Protocol

The ratchet mechanism is widely used in the field of instant messaging encryption, and the Signal protocol—which incorporates the ratchet mechanism—is one of its most representative examples. The Signal protocol can be roughly divided into three main phases:
1. X3DH Protocol: This phase combines long-term, medium-term, and ephemeral Diffie–Hellman keys to generate a shared root key. 2. Asymmetric Ratchet Phase: In this phase, users alternately exchange new ephemeral Diffie–Hellman keys and combine them with the previously generated root key to produce a forward-secret chain key. 3. Symmetric Ratchet Phase: In this phase, no additional randomness is introduced. Instead, a key derivation function (KDF) is used to stretch the chain key forward to derive symmetric encryption keys.
Throughout this process, each message is encrypted using a newly generated ephemeral key, which significantly enhances the protocol’s forward secrecy and post-compromise security. The main steps of the Signal protocol can be summarized in four parts, as illustrated in Figure 1.
Figure 1 illustrates the message exchange procedure of the Signal protocol between an initiator A and a responder B through a server S. The process can be broken down into the following four stages:
  • Registration. Initiator A and Responder B respectively register their identity and prekey bundles with the server. Each prekey bundle contains the party’s respective public keys.
  • Session setup. A requests B’s prekey bundle from the server and establishes a secure communication channel with B. Using these public keys, A generates an initial symmetric encryption key, encrypts a message, and sends it to B. This process is known as the Triple Diffie–Hellman (3DH) handshake. Upon receiving the message, B fetches A’s prekey bundle from the server and derives the shared secret.
  • Symmetric Ratchet Phase. If A needs to send another message to B before receiving a reply, A derives a new symmetric encryption key via the ratchet mechanism, generates a temporary ratchet public key, attaches it to the message, and sends it to B for use in the response.
  • Asymmetric Ratchet Phase. When B receives A’s message and needs to reply, B generates a new temporary ratchet public key, encrypts the message, and sends it to A. When A replies in turn, A generates another temporary ratchet public key based on the received message, encrypts the response, and sends it back to B—thus completing the asymmetric ratchet process.

3.2. Formal Verification Framework

The formal verification process for the Signal protocol’s strong authentication properties, as illustrated in Figure 2.
Figure 2 presents the logical flowchart of the verification process based on the extended Logic of Events theory (LoET). It outlines a stepwise framework: modeling the ratchet phases with LoET, proving unidirectional and bidirectional strong authentication, and determining matching session validity through axiomatic rules and causal consistency. This framework is then translated into a concrete procedural logic, as detailed in the following steps.
  • Use LoET and its extensions to formally describe the ratcheting mechanism of the Signal protocol. Define the actions between initiator A and responder B, specify the basic sequence, and identify the strong authentication properties to be verified.
  • Prove the unidirectional strong authentication property. Assume both A and B are honest. For any instance of the basic sequence, identify matching events and exclude non-matching ones.
  • Check whether the matching events satisfy the session conditions. If so, prove the matching session; otherwise, continue filtering. If only weak matching is found, analyze the sequence length and verify strong matching based on the axioms.
  • After completing the unidirectional proof, verify the bidirectional property. The protocol is secure only if both directions hold. If any event fails even weak matching, the protocol lacks strong authentication and is vulnerable to impersonation.

3.3. Formal Verification of Strong Authentication Properties

In this formal analysis, we adopt the widely accepted Dolev–Yao adversary model, which is particularly well-suited for symbolic verification frameworks such as LoET. Under this model, the adversary is assumed to have full control over the communication channel, including the ability to intercept, modify, replay, delay, and inject arbitrary messages. However, the adversary is considered computationally bounded, and thus incapable of breaking cryptographic primitives—such as encryption schemes, digital signatures, or key derivation functions—unless the corresponding keys have already been compromised.
This model is chosen for its ability to provide a rigorous yet tractable abstraction of real-world adversaries. It enables us to concentrate on the logical structure and causal relationships within the protocol, without relying on the underlying algebraic properties of cryptographic algorithms. The Dolev–Yao model represents a widely accepted assumption in symbolic protocol analysis and provides a solid theoretical foundation for verifying strong authentication guarantees in the Signal protocol under ideal cryptographic conditions.

3.3.1. Formal Description of Basic Sequences

In the Signal protocol, apart from the registration phase—during which A and B register their identities and public keys with the server and request each other’s pre-key bundles—the server does not participate in the conversation. Therefore, we focus only on the interaction between the two communicating parties. The asymmetric and symmetric ratchet phases of the Signal protocol are described using basic sequences. We define Initiator A and Responder B to represent both parties in the interaction. Specifically, I 1 , I 2 , I 3 are the basic sequences of Initiator A, while R 1 , R 2 , R 3 are the basic sequences of Responder B, as illustrated in Figure 3 and  Figure 4. The notations is explained in Table 2.
Figure 3 illustrates the formalized basic event sequences I 1 , I 2 , and I 3 of the initiator A during the asymmetric ratchet phase of the Signal protocol. Each sequence represents a distinct round in the message exchange:
  • I 1 captures the initial message transmission from A to B, where A uses Diffie–Hellman (DH) to generate an ephemeral key and encrypts the message;
  • I 2 models the reception of B’s response, including decryption using A’s previous key and updating A’s ratchet key for forward secrecy;
  • I 3 reflects A’s subsequent message to B, built upon the updated ratchet state.
These sequences collectively represent the progression of ratcheted state transitions at the initiator’s side, and form the basis for verifying the strong authentication property S P auth ( I 3 , 2 ) .
Figure 4 illustrates the formalized basic event sequences R 1 , R 2 , and R 3 of the responder B during the symmetric ratchet phase of the Signal protocol. Each sequence models a message processing step by B after receiving messages from A:
  • R 1 depicts the initial decryption of the received ciphertext from A using the ratcheted key, enabling B to retrieve the plaintext message;
  • R 2 represents the generation of a new ratchet key by B and the encryption of a response message to A, establishing a new ratcheted state;
  • R 3 shows the reception and decryption of a subsequent message from A using the updated ratchet key.
These sequences collectively capture the symmetric ratcheting process on the responder’s side, where key updates are driven by key derivation functions (KDFs) rather than new Diffie–Hellman exchanges. They form the basis for verifying the strong authentication property S P auth ( R 3 , 1 ) .
Whether in the asymmetric or symmetric ratchet interaction phase, if the Signal protocol can ensure that two threads at different states establish a strongly matching session, then it satisfies the properties of strong authentication. Therefore, we define the Signal authentication protocol as Protocol ( I 1 , I 2 , I 3 , R 1 , R 2 , R 3 ) , abbreviated as SP . Next, we analyze the dual ratchet processes separately.

3.3.2. Analysis of the Asymmetric Ratchet

As Figure 1 shows, in the asymmetric ratchet phase, after obtaining B’s prekey bundle, A sends the generated keys and messages to B. Upon receiving the message, B responds to A. The two parties then repeat this process to communicate. According to the description in Section 2, in the asymmetric ratchet phase of the Signal protocol, the strong authentication property to be verified is given by SP auth ( I 3 , 2 ) SP auth ( R 3 , 3 ) .
As Figure 3 shows, we assume that the honest principals A B both behave according to the honest principle (Equation (5)). According to the definition of the basic sequence, each thread of A and B is an instance of the basic sequence. Let thr 1 be an instance on I 3 , and for Atom-typed parameters PKB-B , rchpk 1 A , rchpk 2 B , Rchpk 3 A , m 1 , m 2 , m 3 , s 1 , s 2 , s 3 , there exists an event sequence e 0 < loc e 1 < loc < loc e 8 , and the event instance of thr 1 is as follows:
New ( e 0 ) = PKB B DH ( e 1 ) = rchpk 1 A Encrypt ( e 2 ) = m 1 , rchpk 1 A , s 1 Send ( e 3 ) = s 1 Rcv ( e 4 ) = s 2 Decrypt ( e 5 ) = m 2 , rchpk 1 A , rchpk 2 B , S 2 DH ( e 6 ) = rchpk 2 B , rchpk 3 A Encrypt ( e 7 ) = m 3 , rchpk 2 B , rchpk 3 A , s 3 Send ( e 8 ) = s 3
According to AxiomD (Equation (10)) and AxiomS (Equation (5)), there exists an event e such that e < e 5 DEMatch ( e , e 5 ) loc ( e ) = A loc ( e ) = B . In the basic sequence, actions containing Encrpt() are included in I 1 , I 3 , R 2 . Since it is based on the current event, all future events are not considered, thus I 3 is excluded. This implies that in I 1 or R 2 , there exists a basic sequence that could potentially match with I 3 . Assume e is an instance in R 2 , then for Atom-typed values PKB A , rchpk 1 A , rchpk 2 B , m 1 , m 2 , s 2 , there exists a sequence of events e 0 , e 1 , e 2 , e , e 3 , e 4 on principal B as follows:
e 0 < loc e 1 < loc e 2 < loc e 3 < loc e < loc e 4 Rcv ( e 0 ) = s 1 New ( e 1 ) = PKB A Decrypt ( e 2 ) = m , rchpk 1 A , s 1 Ratchet ( e 3 ) = rchpk 1 A , rchpk 2 B Encrypt ( e ) = m , rchpk 1 A , rchpk 2 B , s 2 Send ( e 4 ) = s 2
DEMatch ( e , e 5 ) holds by AxiomD (Equation (10)) and AxiomE (Equation (11))
Plaintext ( e ) = Plaintext ( e 5 ) ciphertext ( e ) = ciphertext ( e 5 ) MatchingKeys ( key ( e ) , key ( e 5 ) ) rchpk 1 A = rchpk 1 A rchpk 2 B = rchpk 2 B s 2 = s 2 m 2 = m 2
From the Equations (16)–(18), it can be derived that
e 0 < loc e 1 < loc e 2 < loc e < loc e 4 Rcv ( e 0 ) = s 1 New ( e 1 ) = PKB A Decrypt ( e 2 ) = m 1 , rchpk 1 A Ratchet ( e 3 ) = rchpk 1 A , rchpk 2 B Encrypt ( e ) = m 2 , rchpk 1 A , rchpk 2 B , s 2 Send ( e 4 ) = s 2
The Equation (19) shows that e is an instance of R 2 . At this point, e matches e 5 , so it can be excluded from I 1 . Similarly, analyzing the Decrypt ( ) event in R 2 , it must exist in an event e , such that e DEMatch ( e , e 2 ) loc ( e ) = A loc ( e ) = B , thus making Encrypt ( e ) = m 1 , rchpk 1 A , s 1 . Assuming that e is an instance on I 1 , for the Atom type of PKB B , rchpk 1 A , m 1 , s 1 , the event on the main body A would be as follows:
e 0 < loc e 1 < loc e < loc e 2 New ( e 0 ) = PKB B DH ( e 1 ) = rchpk 1 A Encrypt ( e ) = m 1 , rchpk 1 A , s 1 Send ( e 2 ) = s 1
DEMatch ( e , e 2 ) holds by AxiomD (Equation (10)) and AxiomE (Equation (11))
Plaintext ( e ) = Plaintext ( e 2 ) ciphertext ( e ) = ciphertext ( e 2 ) MatchingKeys ( key ( e ) , key ( e 2 ) ) rchpk 1 A = rchpk 1 A s 1 = s 1 m 1 = m 1
From the Equations (19)–(21), it can be derived that
New ( e 0 ) = PKB B DH ( e 1 ) = rchpk 1 A Encrypt ( e ) = m 1 , rchpk 1 A , s 1 Send ( e 2 ) = s 1
The Equation (22) shows that e is an instance on I 1 , and it matches e 2 . From the above proof, we can deduce that Send ( e 3 ) = Rcv ( e 4 ) and Send ( e 4 ) = Rcv ( e 4 ) , which forms two weak matching pairs, Send , Rcv . Next, we need to confirm the event order, e 3 < e 0 and e 4 < e 4 , to prove the strong matching property.
From the extension of Axiom F (Equation (7)) and the has rule (Equations (12)–(15)). It is known that there exists a sending event s between e 3 and e 0 that releases a random number m. If e 3 s , we can obtain e 3 < e 0 . otherwise, If e 0 s , then must exist e 0 < loc ( j ) < e 3 . In this case, s must be the result of a process on the main thread t h 1 of B. According to Axiom F (Equation (7)), it is known that e 3 and e 0 do not exist in the sending event, which implies that the random number m will not be released before e 3 . Therefore, we can conclude that e 3 < e 0 , and similarly, it can be proven that e 4 < e 4 . Thus, SP auth 1 ( l 3 , 2 ) is established.
Similarly, it can be verified that SP = auth ( I 3 , 2 ) . Let thr 2 be a basic sequence on R 3 . Define a sequence of events on thread thr 2 as e 0 < loc e 1 < loc < loc e 7 . For some information of type Atom, including s 1 , s 2 , s 3 , m 1 , m 2 , m 3 , rchpk 1 A , rchpk 2 B , rchpk 3 A , we have Decrypt ( e 7 ) = m 3 , rchpk 2 B , rchpk 3 A , s 3 . According to AxiomD and AxiomS, there exists some event e such that e < e 7 DEMatch ( e , e 7 ) ( loc ( e ) = A loc ( e ) = B ) . Since principal B follows the honesty axiom and mutual authentication protocol, e must be a valid instance in the basic sequence, which includes Encrypt() events from I 3 , I 1 , R 2 . Assume that e is one such instance from I 3 ; then for Atom-type data rchpk 1 A , rchpk 2 B , rchpk 3 A , m 2 , m 3 , s 2 , s 3 , the following events exist in principal: A: e 0 , e 1 , e 2 , e , e 3 , and we have Encrypt ( e ) = m 3 , rchpk 2 B , rchpk 3 A , s 3 .
Therefore, DEMatch ( e , e 7 ) holds. According to Axiom D and Axiom E, we know that there exists an event e in I 3 such that Send ( e 3 ) = s 3 = Rcv ( e 6 ) , forming a weakly matching pair. Similarly, I 1 and R 2 can be excluded. Since it has been proven that e is an event from I 3 , there must exist another event e such that e < e 1 DEMatch ( e , e 1 ) ( loc ( e ) = A loc ( e ) = B ) . The proof process can reference auth ( I 3 , 2 ) . We then have Rcv ( e 0 ) = s 2 = Send ( e 5 ) . Likewise, it can be derived that e < e 2 DEMatch ( e , e 2 ) ( loc ( e ) = A loc ( e ) = B ) , which yields send ( e 3 ) = rcv ( e 0 ) . This completes the proof of three weakly matching pairs.
Next, we need to prove that e 3 < e 6 , e 5 < e 0 , e 3 < e 0 , thereby completing the proof of strong authentication. According to extension of Axiom F and the has rule, we can deduce as follows: Suppose a sending event s releases random number m and occurs between e 3 and e 6 . If e 3 s , we get e 3 < e 6 . Otherwise, if e 6 s , then e 6 < loc ( j ) < e 3 . In this case, s must be a member on thread t h 2 of principal B. According to Axiom F1, we know that e 6 and e 3 are not part of the send event, m will not be released before e 3 . Therefore, we conclude that e 3 < e 6 . Similarly, it can be proven that e 5 < e 0 and e 3 < e 0 . Thus, SP = auth ( R 3 , 3 ) is established.

3.3.3. Analysis of the Symmetric Ratchet

As Figure 4 shows, unlike the asymmetric ratchet phase, in the symmetric ratchet phase, after principal A sends the encryption key and message to B, if B has not received the message or does not respond to A in time upon receiving it, A can continue sending new keys and messages until a response is received from B. Once B responds to A, both parties resume normal communication, alternating between ratchet and non-ratchet steps. Therefore, it is sufficient to prove that the symmetric ratchet phase satisfies the strong authentication properties. According to the description in Section 2, the strong authentication properties that need to be verified in the symmetric ratchet phase of the Signal protocol are SP auth ( I 3 , 2 ) SP auth ( R 3 , 1 ) .
In the asymmetric ratchet phase, assume that honest principals A B , and both parties follow the honest principal rule (Equation (5)). According to the definition of the basic sequence, each thread of A and B is an instance of a basic sequence. Let thr 1 be an instance on I 3 and define e 0 < loc e 1 < loc < loc e 8 , where the following events exist:
New ( e 0 ) = PKB B DH ( e 1 ) = rchpk 1 A Encrypt ( e 2 ) = m 1 , rchpk 1 A , s 1 Send ( e 3 ) = s 1 DH ( e 4 ) = rchpk 2 A Decrypt ( e 5 ) = m 2 , rchpk 2 A , s 2 Send ( e 6 ) = s 2 Rcv ( e 7 ) = s 3 Encrypt ( e 8 ) = m 3 , rchpk 2 A , rchpk 3 B , s 3
According to Axiom D (Equation (10)) and Axiom S (Equation (5)), there exists some event e such that e < e 8 DEMatch ( e , e 8 ) ( loc ( e ) = A loc ( e ) = B ) . In the basic sequence, the Encrypt() action may appear in I 1 , I 2 , or R 3 . To ensure the availability of event occurrences, the event types involving initiator A and responder B must involve both or multiple parties. Therefore, I 1 and I 2 can be excluded. Assuming e is an instance from R 3 , then for Atom-type values s 2 , s 3 , m 2 , m 3 , rchpk 2 A , rchpk 3 B , there exist events e 0 , e 1 , e 2 , e , e 3 on principal B.
e 0 < loc e 1 < loc e 2 < loc e < loc e 3 Rcv ( e 0 ) = s 2 Decrypt ( e 1 ) = m 2 , rchpk 2 A , s 2 Ratchet ( e 2 ) = rchpk 2 A , rchpk 3 B Encrypt ( e ) = m 3 , rchpk 2 A , rchpk 3 B s 3 Send ( e 3 ) = s 3
DEMatch ( e , e 8 ) holds by AxiomD (Equation (10)) and AxiomE (Equation (11))
Plaintext ( e ) = Plaintext ( e 8 ) ciphertext ( e ) = ciphertext ( e 8 ) MatchingKeys ( key ( e ) , key ( e 8 ) ) rchpk 2 A = rchpk 2 A rchpk 3 B = rchpk 3 B s 2 = s 2 s 3 = s 3 m 3 = m 3
From the Equations (23)–(25), it can be derived that
e 0 < loc e 1 < loc e 2 < loc e < loc e 3 Rcv ( e 0 ) = s 2 Decrypt ( e 1 ) = m 2 , rchpk 2 A , s 2 Ratchet ( e 2 ) = rchpk 2 A , rchpk 3 B Encrypt ( e ) = m 3 , rchpk 2 A , rchpk 3 B , s 3 Send ( e 3 ) = s 3
The Equation (26) shows that e is an instance from R 3 . At this point, e matches with e 8 , so we obtain a weakly matching pair Send ( e 3 ) = s 3 = Rcv ( e 7 ) . Similarly, analyzing the Decrypt() event in R 3 , there must exist another event e such that e < e 1 DEMatch ( e , e 1 ) ( loc ( e ) = A loc ( e ) = B ) , which implies that Encrypt ( e ) = m 2 , rchpk 2 A , s 2 holds. At this point, the Encrypt() action exists in either I 1 or I 2 . Assuming e exists in I 2 , then for Atom-type values rchpk 2 A , m 2 , s 2 , there exist events e 0 , e , e 1 .
e 0 < loc e < loc e 1 DH ( e 0 ) = rchpk 2 A Encrypt ( e ) = m 2 , rchpk 2 A , s 2 Send ( e 1 ) = s 2
DEMatch ( e , e 1 ) holds by AxiomD (Equation (10)) and AxiomE (Equation (11))   
Plaintext ( e ) = Plaintext ( e 1 ) ciphertext ( e ) = ciphertext ( e 1 ) MatchingKeys ( key ( e ) , key ( e 1 ) ) rchpk 2 A = rchpk 2 A s 2 = s 2 m 2 = m 2
From Equations (26)–(28), it can be derived that
e 0 < loc e < loc e 1 DH ( e 0 ) = rchpk 2 A Encrypt ( e ) = m 2 , rchpk 2 A , s 2 Send ( e 1 ) = s 2
Therefore, it can be concluded that e is an instance from I 2 . At this point, e matches with e , forming a weakly matching pair Send ( e 1 ) = s 2 = Rcv ( e 0 ) . Similarly, I 1 can be excluded.
Next, we only need to prove e 1 < e 0 and e 3 < e 7 to verify the property of strong matching. According to the extension of AxiomF (Equation (7)) and the has Rule (Equations (12)–(15)), if a sending event s that releases a random number m exists between e 1 and e 0 , then if e 1 s , it follows that e 1 < e 0 ; if e 0 s , then e 0 < loc ( j ) < e 1 . In this case, s must be on thread t h 1 of principal B, and based on Axiom F1, since there is no sending event between e 1 and e 0 , the random number m could not have been released before e 1 . Therefore, we conclude that e 1 < e 0 . Similarly, we can also prove that e 3 < e 7 , and hence SP auth ( I 3 , 2 ) is established.
Based on the proof of SP auth ( I 3 , 2 ) , we now provide a separate proof for SP auth ( R 3 , 1 ) . Let thr 2 be a basic sequence on R 3 . Define the thread thr 2 as having events e 0 < loc e 1 < loc < loc e 4 . For some Atom-type values s 2 , s 3 , m 2 , m 3 , rchpk 2 A , rchpk 3 B , suppose Decrypt ( e 1 ) = m 2 , rchpk 2 A , s 2 . According to Axiom D and Axiom S, there exists an event e such that e < e 1 DEMatch ( e , e 1 ) ( loc ( e ) = A loc ( e ) = B ) . Since principal B follows the honesty axiom and mutual authentication protocol, e must be a valid instance of a basic sequence. The Encrypt() action can appear in either I 1 or I 2 . Assuming e I 2 , then for Atom-type values rchpk 2 A , m 2 , s 2 , the following must exist on principal A: Encrypt ( e ) = m 2 , rchpk 2 A , s 2 . Thus, from DEMatch ( e , e 1 ) , we obtain rchpk 2 A = rchpk 2 A s 2 = s 2 m 2 = m 2 , which leads to Send ( e 1 ) = s 2 . Hence, e is an instance from I 2 , and matches with e 1 , forming a weakly matching pair Send ( e 1 ) = s 2 = Rcv ( e 0 ) . Similarly, I 1 can be excluded through analogous reasoning.
Next, it suffices to confirm the event order e 1 < e 0 . Based on axioms such as AxiomF, we can reason that if there exists a sending event s that releases a random number m between e 1 and e 0 , then if e 1 s , it follows that e 1 < e 0 ; if e 0 s , then there exists j such that e 0 < loc ( j ) < e 1 . At this point, s must be on thread th 2 of principal B. According to AxiomF1, there exists no sending event between e 0 and e 1 , hence random number m could not have been released before e 1 . From this reasoning, we conclude e 1 < e 6 . Therefore, SP auth ( R 3 , 1 ) holds.
In conclusion, based on the above proof, we arrive at the result that both the asymmetric and symmetric ratchet phases in the Signal protocol satisfy strong mutual authentication properties. This can be written as SP auth ( I 3 , 2 ) auth ( R 3 , 3 ) and SP auth ( I 3 , 2 ) auth ( R 3 , 1 ) .
In addition, we construct a symbolic model of the Signal protocol’s ratchet mechanism using the Tamarin prover to verify the strong authentication property between the I3 and R3 stages. The verification result is consistent with our theoretical analysis based on LoET. Further details can be found in Appendix B.

3.3.4. Computational Complexity and Scalability

LoET has strong expressive power, but its current verification process requires manual reasoning steps. When applied to protocols with high state complexity or multiple participants, it may become operationally burdensome. We estimate that the verification of event sequences during each ratchet update round remains linearly tractable, assuming the number of events per round is bounded.
Time Complexity. A typical ratchet round includes one Diffie–Hellman key exchange (two events), one symmetric key derivation (one event), one encryption (one event), and one send/receive pair (two events), totaling approximately six events. Given R ratchet rounds and M messages per round, the number of causal relations to be verified is approximately O ( R × M ) . Since each verification step (based on key and message matching) is a constant-time operation, the overall time complexity is O ( R × M ) .
Space Complexity. The LoET framework must store each event along with its metadata (e.g., position, message content, associated keys). If the total number of events is N = R × M , and each event occupies constant space, then the overall space complexity is O ( N ) . When constructing the flow relation (i.e., the causal graph among events), the worst-case complexity may reach O ( N log N ) , depending on the branching structure of the protocol.
Scalability. The current LoET framework is mainly designed for two-party interaction modeling but can be extended to multi-party protocols (e.g., group messaging). Preliminary analysis suggests that with P participants and R rounds of group communication, the total number of events could reach O ( P × R × M ) , and the size of the causal graph may grow to O ( P 2 × R × M ) . In such cases, identity binding and message routing ambiguity significantly increase, placing greater demands on the modeling of the Clean predicate and AxiomE rule.
These scalability constraints further underscore the importance of understanding how LoET captures core security guarantees such as forward and backward secrecy across diverse communication scenarios.
Forward secrecy is ensured by the unidirectional flow from DH to Ratchet events, making prior keys irrecoverable even if a later key is compromised. This is formally modeled in LoET by the causal dependency chain DH → Ratchet → Encrypt. The Clean predicate ensures that any decryption event is based only on fresh keys derived through legitimate DH and ratchet steps, preventing key reuse or rollback attacks. Backward secrecy is achieved through periodic DH key refresh and use of ephemeral keys. In LoET, this is captured via the New event (nonce/fresh key generation), which is causally linked to each ratchet event. Even if a previous key is compromised, it does not allow the decryption of future messages due to the causal isolation enforced by AxiomE and Rule3. Practically, this allows protocol designers to assess the temporal granularity of key update strategies and understand the trade-off between security and performance. Our model thus offers both formal guarantees and actionable design insights for protocol hardening.

4. Comparison

Frosch et al. [18] proved that the ratchet module of the TextSecure protocol is secure by analyzing the source code of TextSecure v3. However, the composite security of interactions between modules remains unverified. Cohn-Gordon et al. [19] proposed ART (asynchronous ratcheting trees) to achieve stronger security properties, constructing a game-based computational security model to analyze the protocol. Their performance evaluation showed that while ART introduces innovative ratcheting for asynchronous group messaging, it suffers from limitations in computational complexity, synchronization issues, and dynamic group support, which affect the protocol’s performance and scalability. Bellare et al. [20] demonstrated how to formalize ratchet encryption by defining syntax for ratcheted encryption and key exchange, although their model only captures unidirectional ratcheting (sender-side key updates) and does not extend to bidirectional mechanisms such as Signal’s double ratchet algorithm. Beguinet et al. [21] employed the Tamarin tool for formal modeling and verification of Signal’s ratchet protocol, where automated verification relies on explicit security assumptions. However, Tamarin faces limitations in formalizing ratchet processes and integrating them into broader verification procedures.
Compared with the prior works [19,22], this paper introduces several key innovations. In contrast to [19], which proposes the Asynchronous Ratcheting Tree (ART) model focusing on group messaging, our method focuses on formal verification of pairwise ratchet-based protocols, specifically the double ratchet mechanism used in Signal. Rather than employing game-based computational models, we construct a logical model in the Logic of Events (LoET) framework, allowing for deductive proofs of authentication properties. Compared with [22], our work is the first to extend LoET by introducing two new event classes: DH (Diffie–Hellman operations) and ratchet (state update operations). We also add new causal axioms and matching rules (e.g., AxiomE, Rule1–3), enabling modeling of dynamic key evolution. While our primary demonstration uses the Signal protocol, the extended LoET framework is designed to be protocol-agnostic. It can potentially analyze other ratcheting protocols like MLS, but current limitations include lack of automation and scalability for large protocol families.
Unlike Tamarin [21], which supports automated security analysis, it relies on complex user-defined lemmas and does not naturally express bidirectional authentication constraints or temporally structured event matching. In contrast, our approach based on LoET employs explicit causal semantics, enabling clear modeling of the evolution of keys and messages, as well as the logical binding between authentication properties and their cryptographic dependencies. To demonstrate the advantages and necessity of our model, we provide a vulnerability scenario. If AxiomE—the rule that links Diffie–Hellman (DH) and ratchet event chains—is disabled or bypassed, an attacker can inject a forged public key into the communication sequence. This breaks the causal continuity between key derivation steps. Under a false assumption, the receiver may derive an incorrect session key, which ultimately results in impersonation. In this case, the protocol loses its strong authentication guarantees. Our model can formally detect such violations through the failure of the Clean predicate. In Appendix A, we provide a simplified attack example to illustrate how the omission of a critical logical rule can directly lead to protocol failure. Meanwhile, we further compare the Tamarin and ART frameworks through a systematic evaluation. The results demonstrate that LoET offers clear advantages in terms of modeling clarity, expressiveness of authentication properties, and verification efficiency.
Compared with the above methods, LoET offers distinct advantages in verifying the security of ratchet protocols. It accurately expresses security properties using higher-order logic and supports inductive proofs to cover all possible scenarios. Based on LoET, we constructed a bidirectional authentication model that effectively captures the security features of the double ratchet encryption mechanism, ensuring protocol security and improving scalability. With its theoretical depth and formal reasoning capability, LoET serves as a powerful approach for provable security. A summary of the comparison is shown in Table 3.

5. Conclusions

This paper proposes a formal analysis framework for ratchet protocols based on LoET, introducing dedicated axioms and rules tailored to the characteristics of ratchet protocols. It addresses the modeling limitations of traditional formal methods in capturing ratchet encryption mechanisms. Using the Signal protocol as a case study, we construct a bidirectional authentication model for ratchet encryption that precisely captures the security properties required for mutual authentication. We also complete a formal verification of Signal’s strong authentication properties, thereby extending the applicability of LoET to the analysis of ratchet protocols. This work not only provides a theoretical security guarantee for the Signal protocol at a foundational level but also establishes a reusable methodology for the formal verification of similar secure communication protocols.
Building upon the formal security guarantees established in our current model, future work will focus on bridging the gap between theoretical verification and real-world deployment, aiming to promote the practical adoption of formal protocol models in engineering contexts. To further enhance protocol security under real operational conditions, we plan to conduct in-depth research on implementation-level formal verification, including security property validation at the code level, consistency checking between implementations and formal specifications, and security evaluation within execution environments. These efforts aim to establish a complete verification chain spanning from theoretical modeling to engineering practice. Specifically, our planned directions include: (1) developing a prototype tool capable of parsing protocol communication logs and automatically generating corresponding LoET event models; (2) extending the LoET framework to support group communication and dynamic participant management, while exploring integration with the ART model for hybrid verification; (3) enhancing the framework’s ability to capture asynchronous communication scenarios, such as message loss and reordering; and (4) extracting event traces from real-world protocol logs (e.g., Wire, WhatsApp) and validating their conformance to the formal model’s causal dependencies and authentication semantics. Collectively, these efforts will further advance the applicability of the LoET framework in diverse communication protocols and provide systematic support for the verifiable design and implementation of secure protocols.

Author Contributions

Conceptualization, M.X. and Z.L.; methodology, H.W.; formal analysis, H.W.; Investigation, H.F. and H.S.; writing—original draft preparation, H.W.; writing—review and editing, M.X. and Z.L.; visualization, H.W.; supervision, Z.L. and K.Y.; All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China (No. 62362033, 61962020), Double Thousand Talent Plan of Jiangxi Province (No. jxsq2023201009), Natural Science Foundation of Jiangxi Province (No. 20224ACB202006), Jiangxi Province Early Career Youth Science and Technology Talent Training Special Project (No. 20244BCE52146).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in this article, further inquiries can be directed to the corresponding author.

Acknowledgments

The authors thank the anonymous reviewers and editors for their insightful comments and suggestions.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A

Appendix A.1. Attack Scenario Demonstration: DH Key Substitution and Clean Predicate Violation

To illustrate how omission of LoET rules (such as AxiomE) can break authentication, we provide the following example:
  • Assume Alice initiates a session and sends Bob her DH public key: DH(A) = aG.
  • An attacker, Mallory, intercepts the message and replaces aG with her forged DH key DH(M) = mG.
  • Bob, unaware of this manipulation and without enforcing AxiomE (which links DH to subsequent ratchet operations), uses his private key b to compute K B = H ( m G × b ) .
  • Bob proceeds to generate a new ratchet state using K B , encrypts a message using this state, and sends it back to Alice.
  • Alice, expecting a G as the DH input, uses her private key a and Bob’s original public key b G to compute K A = H ( b G × a ) .
  • Since K B K A , Alice is unable to decrypt the message. Worse, if Bob had continued without verification, Mallory could use m to decrypt the message and impersonate Bob by replying with forged messages under her control.
This demonstrates how lack of causal enforcement (i.e., missing DH → ratchet linkage) permits an attacker to inject invalid DH values and break authentication. In LoET, this violation is captured as a failure of the Clean predicate: the ratchet update and encryption event are no longer causally traceable back to a valid DH event from Alice. Thus, any decryption based on such a compromised key violates the LoET-defined trust chain.

Appendix A.2. Tool Comparison: LoET vs. Tamarin and ART

We further compared the Tamarin and ART frameworks through a systematic analysis of modeling abstraction, ratchet support, semantic expressiveness, and verification complexity (see Table A1). The results show that LoET demonstrates clear advantages in modeling clarity, expressiveness of authentication properties, and efficiency in verification steps.
Table A1. Comparison of ratchet verification tools.
Table A1. Comparison of ratchet verification tools.
ToolModeling AbstractionRatchet SupportMatch SemanticsAvg. Verification Steps
LoET (ours)Event classes + logic axioms✓ Native support via DH, ratchet events✓ Explicit session and causality rules (Equations (2) and (3))6–10
Tamarin ProverMultiset rewriting with manual lemma definitions✓ Indirectly encoded via states× Implicit via message/state replay tracking20–30
ARTAsynchronous tree-based state modeling✓ Partially supports tree ratchets× Implicit through tree structure>30

Appendix B

Appendix B.1. Verification of Signal Ratchet Authentication Using Tamarin

To enhance the credibility of the LoET-based formal verification and address the absence of executable validation, we develop a symbolic model of the Signal protocol’s ratchet mechanism using the Tamarin prover. This model successfully verifies the strong authentication property between the I3–R3 stages, in close alignment with the theoretical results established in Section 3.3.
Figure A1. This lemma expresses that for any session initiated honestly by A with B, there exists a matching responder session ensuring message integrity and order consistency. Otherwise, these rules simulate the fundamental behavior of the asymmetric ratchet phase in Signal and reflect message causality and key binding through Tamarin’s trace mechanism.
Figure A1. This lemma expresses that for any session initiated honestly by A with B, there exists a matching responder session ensuring message integrity and order consistency. Otherwise, these rules simulate the fundamental behavior of the asymmetric ratchet phase in Signal and reflect message causality and key binding through Tamarin’s trace mechanism.
Applsci 15 06964 g0a1

Appendix B.2. Constructive Derivation of the Clean Predicate

In Section 2.3.3, the Clean predicate was introduced to ensure the secrecy of atom values (e.g., ratchet keys). We now formally define how Clean(e, a) can be derived and validated within an event trace.
Figure A2. Clean predicates contribute to forward and backward secrecy by ensuring that sensitive keys remain unexposed in the trace and can be recursively computed during automated verification.
Figure A2. Clean predicates contribute to forward and backward secrecy by ensuring that sensitive keys remain unexposed in the trace and can be recursively computed during automated verification.
Applsci 15 06964 g0a2
This section thus enhances the executable foundation of our symbolic framework, reinforcing the correctness and applicability of the extended Logic of Events theory (LoET) for real-world protocol verification.

References

  1. Feng, H. Real-World Security Protocols. IEEE Secur. Priv. 2024, 11, 9–10. [Google Scholar]
  2. Bellare, M.; Yee, B. Forward-Security in Private-Key Cryptography. In Proceedings of the CT-RSA Conference, Heidelberg, Germany, 13–17 April 2003; pp. 1–18. [Google Scholar]
  3. Wei, J.; Chen, X.; Wang, J.; Hu, X.; Ma, J. Enabling (End-to-End) Encrypted Cloud Emails with Practical Forward Secrecy. IEEE Trans. Dependable Secur. Comput. 2022, 7, 2318–2332. [Google Scholar] [CrossRef]
  4. Yu, S.J.; Lee, Y.C.; Lin, L.H.; Yang, C.H. An Energy-Efficient Double Ratchet Cryptographic Processor with Backward Secrecy for IoT Devices. IEEE J. Solid-State Circuits 2023, 6, 1810–1819. [Google Scholar] [CrossRef]
  5. Afzal, A.; Hussain, M.; Saleem, S.; Shahzad, M.K. Encrypted Network Traffic Analysis of Secure Instant Messaging Application: A Case Study of Signal Messenger App. Appl. Sci. 2021, 11, 7789. [Google Scholar] [CrossRef]
  6. Ahmed, W.; Shahzad, F.; Javed, A.R.; Iqbal, F.; Ali, L. WhatsApp Network Forensics: Discovering the IP Addresses of Suspects. In Proceedings of the 2021 11th IFIP International Conference on New Technologies, Mobility and Security (NTMS), Paris, France, 19–21 April 2021. [Google Scholar]
  7. Nabeel, M. The Many Faces of End-to-End Encryption and Their Security Analysis. In Proceedings of the 2017 IEEE International Conference on Edge Computing (EDGE), Honolulu, HI, USA, 25–30 June 2017. [Google Scholar]
  8. Bhargavan, K.; Jacomme, C.; Kiefer, F.; Schmidt, R. Formal Verification of the PQXDH Post-Quantum Key Agreement Protocol for End-to-End Secure Messaging. In Proceedings of the 33rd USENIX Security Symposium (USENIX Security 2024), Philadelphia, PA, USA, 14–16 August 2024. [Google Scholar]
  9. Poettering, B.; Rösler, P. Towards Bidirectional Ratcheted Key Exchange. In Advances in Cryptology—CRYPTO 2018: Proceedings of the 38th Annual International Cryptology Conference, Santa Barbara, CA, USA, 19–23 August 2018; Shacham, H., Boldyreva, A., Eds.; Springer: Berlin/Heidelberg, Germany, 2018. [Google Scholar]
  10. Cohn-Gordon, K.; Cremers, C.; Dowling, L.; Garratt, L.; Stebila, D. A Formal Security Analysis of the Signal Messaging Protocol. In Proceedings of the 2017 IEEE European Symposium on Security and Privacy, Paris, France, 26–28 April 2017. [Google Scholar]
  11. Lv, C. The Dilemma and Countermeasures of Personal Privacy Protection in the Era of Big Data. In Proceedings of the 2022 3rd International Conference on Electronic Communication and Artificial Intelligence (IWECAI), Zhuhai, China, 24–26 June 2022. [Google Scholar]
  12. Perrin, T. The X3DH Key Agreement Protocol. Available online: https://whispersystems.org/docs/specifications/x3dh (accessed on 28 April 2025).
  13. Perrin, T. The Double Ratchet Algorithm. Available online: https://whispersystems.org/docs/specifications/doubleratchet (accessed on 28 April 2025).
  14. Borisov, N.; Goldberg, L.; Brewer, E. Off-the-Record Communication, or, Why Not to Use PGP. In Proceedings of the 2004 ACM Workshop on Privacy in the Electronic Society (WPES), Washington, DC, USA, 28 October 2004. [Google Scholar]
  15. Bienstock, A.; Paul, R.; Yi, T. Asmesh: Anonymous and Secure Messaging in Mesh Networks Using Stronger, Anonymous Double Ratchet. In Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security (CCS), New York, NY, USA, 26–30 November 2023. [Google Scholar]
  16. Bhati, A.S.; Dufka, A.; Andreeva, E.; Roy, A.; Preneel, B. Skye: An Expanding PRF-Based Fast KDF and Its Applications. In Proceedings of the 19th ACM Asia Conference on Computer and Communications Security (AsiaCCS 2024), New York, NY, USA, 1–5 July 2024. [Google Scholar]
  17. Marlinspike, M. Advanced Cryptographic Ratcheting. Available online: https://signal.org/blog/advanced-ratcheting (accessed on 28 April 2025).
  18. Frosch, T.; Mainka, C.; Bader, C.; Bergsma, F.; Schwenk, J.; Holz, T. How Secure is TextSecure? In Proceedings of the 2016 IEEE European Symposium on Security and Privacy (EuroS&P), Saarbrücken, Germany, 21–23 March 2016. [Google Scholar]
  19. Cohn-Gordon, K.; Cremers, C.; Garratt, L.; Millican, J.; Milner, K. On Ends-to-Ends Encryption: Asynchronous Group Messaging with Strong Security Guarantees. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security (CCS), New York, NY, USA, 15–19 October 2018. [Google Scholar]
  20. Bellare, M.; Singh, A.C.; Jaeger, J.; Nyayapati, M.; Stepanovs, I. Ratcheted Encryption and Key Exchange: The Security of Messaging. In Proceedings of the 37th Annual International Cryptology Conference (CRYPTO 2017), Santa Barbara, CA, USA, 20–24 August 2017. [Google Scholar]
  21. Beguinet, H.; Chevalier, C.; Ricosset, T.; Senet, H. Formal Verification of a Post-Quantum Signal Protocol with Tamarin. In Proceedings of the International Conference on Verification and Evaluation of Computer and Communication Systems (VECoS 2023), Marrakech, Morocco, 13–15 November 2023. [Google Scholar]
  22. Li, Z.; Xiao, M.; Xu, R. Formal Analysis of Signal Protocol Based on Logic of Events Theory. Sci. Rep. 2024, 14, 71666. [Google Scholar] [CrossRef] [PubMed]
  23. Almuzaini, N.Z.; Ahmad, I. Formal Analysis of the Signal Protocol Using the Scyther Tool. In Proceedings of the 2019 2nd International Conference on Computer Applications & Information Security (ICCAIS), Riyadh, Saudi Arabia, 1–3 May 2019. [Google Scholar]
  24. Linker, F.; Sasse, R.; Basin, D. A Formal Analysis of Apple’s iMessage PQ3 Protocol. Report No. 1395. 2024. Available online: https://eprint.iacr.org/2024/1395 (accessed on 28 April 2025).
  25. Xiao, M.; Bickford, M. Logic of Events for Proving Security Properties of Protocols. In Proceedings of the 2009 International Conference on Web Information Systems and Mining (WISM), Shanghai, China, 7–8 November 2009. [Google Scholar]
  26. Bickford, M.; Constable, R. Automated Proof of Authentication Protocols in a Logic of Events. In Proceedings of the 6th International Verification Workshop (VERIFY 2010), Washington, DC, USA, 15 July 2010. [Google Scholar]
  27. Datta, A.; Derek, A.; Mitchell, J.; Roy, A. Protocol Composition Logic (PCL). Electron. Notes Theor. Comput. Sci. 2007, 172, 311–358. [Google Scholar] [CrossRef]
  28. Kobeissi, N.; Bhargavan, K.; Blanchet, B. Automated Verification for Secure Messaging Protocols and Their Implementations: A Symbolic and Computational Approach. In Proceedings of the 2017 IEEE European Symposium on Security and Privacy (EuroS&P), Paris, France, 26–28 April 2017; pp. 435–450. [Google Scholar]
  29. Kobeissi, N.; Nicolas, G.; Tiwari, M. Verifpal: Cryptographic Protocol Analysis for the Real World. In Progress in Cryptology—INDOCRYPT 2020: 21st International Conference on Cryptology in India, Bangalore, India, 13–16 December 2020; Lecture Notes in Computer Science; Bhargavan, K., Oswald, E., Prabhakaran, M., Eds.; Springer: Cham, Switzerland, 2020; Volume 12578, pp. 153–177. [Google Scholar]
  30. AlSobeh, A.M.R. OSM: Leveraging Model Checking for Observing Dynamic Behaviors in Aspect-Oriented Applications. Online J. Commun. Media Technol. 2023, 13, e202355. [Google Scholar] [CrossRef]
  31. AlSobeh, A.M.R.; Magableh, A.A. BlockASP: A Framework for AOP-Based Model Checking Blockchain System. IEEE Access 2023, 11, 115062–115075. [Google Scholar] [CrossRef]
Figure 1. Message exchange diagram of the Signal protocol between A and B through server S.
Figure 1. Message exchange diagram of the Signal protocol between A and B through server S.
Applsci 15 06964 g001
Figure 2. Flowchart for verifying the strong authentication of the Signal protocol using LoET.
Figure 2. Flowchart for verifying the strong authentication of the Signal protocol using LoET.
Applsci 15 06964 g002
Figure 3. Basic sequence of the asymmetric ratchet phase.
Figure 3. Basic sequence of the asymmetric ratchet phase.
Applsci 15 06964 g003
Figure 4. Basic sequence of the symmetric ratchet phase.
Figure 4. Basic sequence of the symmetric ratchet phase.
Applsci 15 06964 g004
Table 1. Basic notations and semantics in Logic of Events theory (LoET).
Table 1. Basic notations and semantics in Logic of Events theory (LoET).
NotationSemanticsExample
IDIdentifier of protocol participantA, B
AtomUnpredictable informationnonce, key, signature
DataMessage content or plaintext“Hello”, session key
eAn individual eventEncrypt(e)
EA set of eventsE = {e1, e2, e3}
nonceRandom number generated in protocolr = New(e)
hasPredicate indicating data is contained in evente has a
bsBasic event sequence for a participantI1, R2
<Causal ordering of eventse1 < e2
loc(e)Principal executing event eloc(e) = A
key(e)Cryptographic key used in event ekey(e) = PrivKey(A)
New(e)Random atom introduced by event eNew(e) = r
Send(e)Sending message eventSend(e) = “msg”
Rcv(e)Receiving message eventRcv(e) = “msg”
Encrypt(e)Encryption event with message, key, atomEncrypt(e) = m , k , a
Decrypt(e)Decryption event corresponding to Encrypt(e)Decrypt(e) = m , k , a
Table 2. Notation descriptions.
Table 2. Notation descriptions.
NotationsDescription
PKB-XPrekey bundle of X
rchpk x y The x-th ratchet key generated by party y
m x The x-th ciphertext of the sender
s x The x-th message
Table 3. Comparison of ratchet protocol analysis methods and their verification efficiency.
Table 3. Comparison of ratchet protocol analysis methods and their verification efficiency.
ReferenceResearch MethodAnalysis of Ratchet Verification Efficiency
This paperLoET (Extended)Models bidirectional authentication; introduces DH and ratchet event types, AxiomE, and Clean predicate; supports full ratchet evolution. ✓ Structured logic; supports over three strong matching events; short reasoning paths; modular logic; suitable for pre-integration with automated tools; the time complexity is O ( R M ) .
Ref. [18]TextSecure source analysisOnly validates modules; lacks formal modeling and global security reasoning.×   No formal reasoning structure; depends on source code details; verification cannot be generalized
Ref. [19]ARTSupports asynchronous group ratchet; suffers from complexity, sync issues, and weak verification support.×   Complex state transitions; cannot support systematic authentication; low verification efficiency
Ref. [20]Syntax for ratcheted encryptionModels unidirectional ratchet; does not capture Signal’s double ratchet logic. ×   Cannot construct complete authentication chains; lacks modeling for complex causal event dependencies; limited verification
Ref. [21]TamarinAutomates partial proofs; lacks native support for causality or bidirectional authentication semantics. ×   Automated but requires model rewriting; lacks efficient matching for structured events; leads to long and fragmented verification;the time complexity is O ( 2 n ) .
Ref. [22]Original LoETEarly LoET use; no AxiomE/Clean support; only basic match rules used. ×   Coarse-grained modeling; fewer verification steps and weak completeness; lacks Clean and AxiomE support; incomplete reasoning paths
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Xiao, M.; Wan, H.; Fan, H.; Shao, H.; Li, Z.; Yang, K. Formal Analysis of Ratchet Protocols Based on Logic of Events. Appl. Sci. 2025, 15, 6964. https://doi.org/10.3390/app15136964

AMA Style

Xiao M, Wan H, Fan H, Shao H, Li Z, Yang K. Formal Analysis of Ratchet Protocols Based on Logic of Events. Applied Sciences. 2025; 15(13):6964. https://doi.org/10.3390/app15136964

Chicago/Turabian Style

Xiao, Meihua, Hongbin Wan, Hongming Fan, Huaibin Shao, Zehuan Li, and Ke Yang. 2025. "Formal Analysis of Ratchet Protocols Based on Logic of Events" Applied Sciences 15, no. 13: 6964. https://doi.org/10.3390/app15136964

APA Style

Xiao, M., Wan, H., Fan, H., Shao, H., Li, Z., & Yang, K. (2025). Formal Analysis of Ratchet Protocols Based on Logic of Events. Applied Sciences, 15(13), 6964. https://doi.org/10.3390/app15136964

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop