Next Article in Journal
A Pruning Strategy-Based Object Tracking Method
Previous Article in Journal
Privacy-Preserving Protocols in Smart Cities and Industrial IoT: Challenges, Trends, and Future Directions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Improved DHKE-Based Encryption–Decryption Mechanism for Formation Control of MASs Under Hybrid Attacks

School of Cyber Science and Engineering, Sichuan University, Chengdu 610207, China
*
Author to whom correspondence should be addressed.
Electronics 2026, 15(2), 401; https://doi.org/10.3390/electronics15020401
Submission received: 15 December 2025 / Revised: 14 January 2026 / Accepted: 15 January 2026 / Published: 16 January 2026
(This article belongs to the Special Issue Multi-Agent Systems: Applications and Directions)

Abstract

This work studies the formation control problem of general linear multi-agent systems (MASs) under hybrid attacks that include man-in-the-middle attacks (MITM) and denial-of-service attacks (DoS). First, an improved Diffie–Hellman key exchange (DHKE)-based encryption–decryption mechanism is proposed. This mechanism combines the challenge–response mechanism and hash function, which can achieve identity authentication, detect MITM attacks and ensure the confidentiality and integrity of information. Second, considering that DoS attacks on different channels are independent, a division model for distributed DoS attacks is established, which can classify attacks into different patterns. Third, an edge-based event-triggered (ET) formation control scheme is proposed. This control method only relies on the information of neighbor agents, which not only saves communication resources but also resists distributed DoS attacks. Finally, sufficient conditions for the implementation of formation control for MASs under hybrid attacks are provided, and the effectiveness and advantages of the proposed strategy are verified by simulation.

1. Introduction

In recent decades, multi-agent systems (MASs) have become a research hotspot due to their wide range of applications in distributed cooperative control [1], such as unmanned aerial vehicle (UAV) formations [2], smart grids [3], robot collaboration [4], etc. As one of the fundamental problems in the cooperative control of MASs, formation control’s goal is to enable agents to form and maintain a specific spatial structure during movement while adapting to environmental changes [5]. The research achievements of formation control for MASs have attracted widespread application in fields such as autonomous underwater vehicles (AUV) [6], satellite formations [7], etc. For instance, in work [6], based on the characteristics of MASs, a multi-acoustic underwater vehicle formation control algorithm based on autonomous mobile agent behavior is proposed, which employs a distributed consensus coordination algorithm to achieve robust tracking. In work [7], a hybrid system method and a novel hybrid ET mechanism are proposed, which accomplishe the bipartite consensus control problem of the satellite formation systems.
In an open network environment, malicious attackers often employ various cyberattacks to attempt to steal the information transmitted by agents and disrupt the normal operation of MASs. Common cyberattacks include denial-of-service (DoS) attacks, false data injection (FDI) attacks, man-in-the-middle (MITM) attacks, etc., [8,9,10,11,12,13,14]. At present, a large number of studies have been conducted on DoS and FDI attacks. In work [9], a multiple DoS attacks model based on discrete sampling data communication was established, and by designing an adaptive distributed control protocol, the secure consensus results of MASs with Euler–Lagrange dynamics and multiple DoS attacks are obtained. In addition, in [11], a new dynamic-memory-weight-dependency security control protocol is proposed, which dynamically adjusts the weight of historical released packets according to DoS attacks to alleviate the influence of DoS attacks. In work [14], in order to eliminate the negative impact of FDI attacks and reduce the burden of virtual control iterative calculations, a security control algorithm is designed, which combines the modified coordinate transformation and the dynamic surface control (DSC) method for nonlinear MASs suffering from FDI attacks. However, in the real network environment, multiple types of attacks may exist simultaneously, and meanwhile, few studies have focused on MASs suffering from MITM attacks. Therefore, how to defend against hybrid attacks has become a challenge for the formation problem of MASs. These attacks make the information exchange among agents in MASs very insecure [15], seriously threatening the confidentiality and integrity of MASs. Confidentiality refers to ensuring that the data transmitted in network communication can only be accessed by authorized recipients, preventing the data from being intercepted or stolen by unauthorized third parties. Integrity refers to ensuring that data is not tampered with or damaged during transmission or storage. In order to solve the security problem of MASs, two effective methods are usually used, namely differential privacy techniques [16,17] and encryption–decryption algorithms [18,19,20]. The principle of differential privacy technology is to inject carefully controlled random noise into the data, so that the presence or absence of any single data record will not have a significant impact on the final result of data analysis [21]. However, it may reduce the accuracy and usability of the data [21,22]. In contrast, encryption–decryption algorithms use appropriate algorithms and keys to encrypt and decrypt data without affecting the original data [23]. In work [18], an encryption–decryption mechanism is designed to encrypt the estimated state into a series of finite-level codewords. After being received and processed by the corresponding decryption algorithm, they are used to design the consensus controller. In work [20], a uniform-quantization-based encoding-decoding mechanism is introduced to solve the consensus tracking problem of a class of nonlinear discrete-time MASs. Above all, how to design an encryption–decryption mechanism to resist hybrid attacks and protect the formation security of MASs is the first motivation of this research.
In addition, another important factor to be considered for MASs is the cost of computing and communication. During MAS formations, agents will exchange information frequently, which may occupy a large amount of communication resources. If there are no effective methods adopted to save communication resources, it may even lead to the disintegration of the communication network. To alleviate the excessive occupation of communication resources, the event-triggering (ET) mechanism is widely applied. Currently, a large number of ET mechanisms are applied to MASs [24,25,26]. For example, in [25], in order to avoid continuous communication between neighboring agents, an intermittent communication strategy based on ET functions is established in the proposed distributed differentially private consensus algorithm. However, all the above-mentioned ET mechanisms are based on nodes. When an event occurs, the agent always needs to broadcast its communication data to all neighbors simultaneously, which can lead to some unnecessary consumption of communication resources. In recent years, another triggering mechanism, namely the edge-based ET mechanism, has attracted considerable attention [27,28,29,30]. For instance, In work [30], a novel adaptive dynamic ET scheme is proposed by introducing dynamic threshold update rules related to each edge to reduce communication burden and lower resource consumption. When an event is triggered, information is exchanged between the two agents without involving all neighbors, which greatly reduces the consumption of communication resources. However, all the above-mentioned studies are based on a secure network environment. When the MAS formation is subjected to hybrid attacks, how to design an edge-based ET formation control protocol becomes a challenge, which is the second motivation of this paper.
As discussed above, this paper aims to design an encryption–decryption mechanism based on edge-events triggered formation control protocol for MASs under hybrid attacks. The main contributions of this study can be summarized as follows:
1.
An improved DHKE-based encryption–decryption mechanism is designed. This method is based on the DHKE protocol, the challenge–response mechanism and the hash function. The DHKE protocol is used to generate session keys between agents. The challenge–response mechanism is employed to complement the identity authentication function of the DHKE protocol and the hash functions provide security for identity authentication. Therefore, the improved DHKE-based encryption–decryption mechanism can resist MITM attacks and ensure the confidentiality and integrity of information.
2.
Under distributed DoS attacks, an edge-based ET formation control protocol for MASs is designed. This method only requires information from neighbors, and the triggering solely depends on edge events. Compared with [24,25,26], which use node-based ET control, it can save communication resources more effectively.
3.
Under hybrid attacks, the sufficient conditions for MASs to achieve formation control are established which are verified through simulation.
Notations 1.
R n represents the n-dimensional vector, and R n × m represents the n × m real matrices. Let A T represent the transposed matrix of A. 1 N denotes the N × 1 column vector with all ones, and I N denotes the N-dimensional identity matrix. The intersection and union are, respectively, represented as ∩ and ∪. The Kronecker product is denoted by .   d i a g { . } represents the diagonal matrix. The maximum and minimum eigenvalues of symmetric matrix A are, respectively, denoted by λ m i n ( A ) and λ m a x ( A ) . The notation Q > 0   ( Q 0 ) implies that Q is symmetric positive definite (positive semidefinite).

2. Preliminaries and Problem Formulation

2.1. System Description

A MAS consisting of N agents is considered, in which each agent satisfies the following dynamic model:
x i ˙ ( t ) = A x i ( t ) + B u i ( t ) y i ( t ) = C x i ( t ) ,   i = 1 ,   2 ,   ,   N
where x i ( t ) R n , u i ( t ) R m , and y i ( t ) R q are the system state, the control input and the output of the ith agent at instant t, respectively. A R n × n , B R n × m and C R q × n are known constant matrices. Assume that ( A ,   B ) is stabilizable and ( A ,   C ) is detectable. In realistic MASs with output feedback, in order to infer the system state x i ( t ) from the output y i ( t ) , the following state observer is used:
v ˙ i ( t ) = A v i ( t ) + B u i ( t ) + F ( C v i ( t ) y i ( t ) )
where v i ( t ) represents the estimate of x i ( t ) and F is the observer feedback gain matrix such that A + F C is Hurwitz.
An undirected graph G = { V ,   E ,   A } of order N is used to indicate the communication relationship of the MAS, where V = { 1 ,   2 ,   ,   N } and E V × V , respectively, denotes the node set and edge set. A = a i j R N × N is the adjacency matrix of the graph G . If ( i ,   j ) E , then a i j = 1 , which indicates that agents i and j exchange data with each other; else, a i j = 0 . N i represents the set of agent i’s neighbors. A graph G is said to be connected if there exists a path between any pair of distinct nodes; otherwise, it is disconnected. It is assumed that a i i = 0 . The Laplacian matrix is given by L = D A , where D = d i a g { d 1 ,   d 2 ,   ,   d N } and d i = j = 1 N a i j . The Laplacian matrix under attacks is denoted as L Φ .
A desired time-varying formation for the agents is denoted by f ( t ) = [ f 1 T ( t ) ,   f 2 T ( t ) ,   ,   f N T ( t ) ] T , where f i ( t ) R n is the piecewise continuously differentiable formation vector for agent i. Inspired by [31], not all formation functions are achievable, and they need to meet the feasibility condition:
A f i ( t ) f ˙ i ( t ) + B κ i ( t ) = 0
where κ i ( t ) is the formation compensation input of agent i.

2.2. The Improved DHKE-Based Encryption-Decryption Mechanism

Due to the distributed architecture and frequent interaction between agents, the MASs (Equation (1)) are susceptible to network attacks such as MITM attacks. As one of the most common attacks in MASs, an attacker of MITM attempts to act as a legitimate middle agent between two communicating agents, thereby eavesdropping, stealing and even tampering with the data.
In this section, we focus on securing the online communication phase of the MAS against MITM attacks. Attacks targeting the offline initialization phase or physical compromise of agents are not considered.
The Diffie–Hellman key exchange (DHKE) protocol, as a key negotiation method, enables two agents to exchange keys over an insecure public channel without a pre-shared key, and ultimately generate a shared key. Additionally, the challenge–response mechanism can be used for identity authentication between agents, which effectively compensates for the lack of authentication in the DHKE mechanism. In order to detect and prevent MITM attacks to guarantee the confidentiality and integrity of inter-agent data transmission, an improved DHKE-based encryption–decryption mechanism is proposed for MAS (Equation (1)).
The communication structure diagram of the MAS (Equation (1)) with the improved DHKE-based encryption–decryption mechanism is shown in Figure 1a. The event-triggered sequence on edge ( i ,   j ) is generated as { t k i j } k N , which means agent i only exchanges information with agent j at triggering moments t k i j . Before the data is transmitted, both agents need to first negotiate a key and the sender encrypts the data by the key. After receiving the encrypted data, the receiver decrypts it by using the same key. The improved DHKE-based encryption–decryption mechanism consists of three parts: (a) Initialization, (b) Key exchange and (c) Encryption-decryption.
(a)
Initialization. Before key exchange, agent i generates password P W D and agent j generates random salt S A L T . Agent i stores the encrypted data E P W D ( S A L T ) which means S A L T is encrypted by P W D and agent j stores H 3 = H P W D | | S A L T .
It is emphasized that the P W D and S A L T are provisioned to agents during an offline secure initialization phase. These parameters are not globally shared across the entire network, but are pairwise long-term credentials. Meanwhile, the encrypted storage of S A L T serves as a lightweight protection against accidental or non-invasive credential leakage. It is not intended to protect against full memory inspection attacks, which imply complete agent compromise and are beyond the considered threat model.
(b)
Key exchange. As shown in the key exchange flowchart in Figure 1b, q is a large prime number and a is the primitive root of q. The key exchange part is divided into the following five steps:
  • Agent i sends signal C to declare its identity.
  • Agent j receives C and sends a random challenge number R j .
  • Agent i decrypts E P W D ( S A L T ) with P W D stored locally to obtain S A L T . Next, select a secret large number x that satisfies x < q and calculate a x m o d q and H 1 = H P W D | | S A L T . Then, generate challenge number R i and calculate H 2 = H ( H 1 | | a x m o d q | | R j ) . Finally, send H 2 | | a x m o d q | | R i to agent j.
  • Agent j retrieves H 3 stored locally and calculates H 4 = H H 3 | | a x m o d q | | R j . If H 4 = H 2 , select a secret large number y that satisfies y < q , calculate a y m o d q and H 5 = H H 3 | | a y m o d q | | R i and send H 5 | | a y m o d q to agent i; else, key exchange will fail.
  • Agent i calculates H 6 = H ( H 1 | | a y m o d q | | R i ) . If H 6 = H 5 , send a acknowledge signal A C K to agent j to indicate successful key exchange; else, key exchange will fail.
Then, the two communication agents negotiate the K E Y = a x y m o d q known only to both of them. The negotiated key is a fresh session key and is independent of long-term credentials. Even if a long-term credential is compromised, only the corresponding communication links are affected, while other links remain secure.
(c)
Encryption-decryption (AES-128-GCM). After completing the authenticated key exchange, the two agents obtain a shared KEY = axy mod q. Since KEY is not necessarily 128-bit, a symmetric session key k i j 0 ,   1 128 is derived via a key derivation function (KDF)
k i j = T r u n c 128 ( H ( K E Y | | i | | j ) ) ,
where T r u n c 128 ( · ) extracts the first 128 bits. At each triggering moment t k i j , agent i forms the plaintext v i j ( t k i j ) = v i T ( t k i j ) ,   f i T ( t k i j ) T . To ensure both confidentiality and integrity, agent i encrypts v i j ( t k i j ) using an authenticated encryption with associated data (AEAD) scheme, namely AES-128-GCM. A nonce n i j ( t k i j ) is generated using a monotonically increasing counter, which is initialized at session establishment and incremented by one for each transmitted packet, ensuring nonce uniqueness per session key. The associated data a d i j ( t k i j ) includes the edge index ( i ,   j ) and the triggering instant t k i j , which binds the ciphertext to a specific communication link and transmission time. The encryption process is given by
( c i j ( t k i j ) ,   t a g i j ( t k i j ) ) = A E A D . E n c A E S ( k i j ,   n i j ( t k i j ) ,   v i j ( t k i j ) ,   a d i j ( t k i j ) .
and agent i sends packet ( n i j ( t k i j ) ,   a d i j ( t k i j ) ,   c i j ( t k i j ) ,   t a g i j ( t k i j ) ) to agent j. Upon receiving a packet, agent j performs authenticated decryption using the shared session key k i j . Specifically, agent j computes
v i j * ( t k i j ) = A E A D . D e c A E S ( k i j ,   n i j ( t k i j ) ,   c i j ( t k i j ) ,   a d i j ( t k i j ) ,   t a g i j ( t k i j ) ) .
If tag verification succeeds, then v i j * ( t k i j ) = v i j ( t k i j ) ; otherwise, the packet is discarded and treated as invalid, which provides integrity protection against malicious data modification.
By adopting AES-128-GCM, the proposed communication layer achieves authenticated encryption, i.e., confidentiality and integrity simultaneously. Any tampering with the nonce, ciphertext, tag, or associated data will be detected during tag verification, and the corresponding packet will be discarded. Meanwhile, it is noted that the key exchange procedure is executed only after the event trigger is triggered, rather than being executed in real-time within the control loop. The secret values used in the DHKE process are selected as large random integers and do not require online primality testing. Therefore, the computational overhead is acceptable for resource-constrained agents.
In order to present the improved DHKE-based encryption–decryption mechanism more clearly, Algorithm 1 is provided.
Remark 1.
The improved DHKE-based EDM for MAS (Equation (1)) can effectively detect MITM attacks, which is mainly completed by judging the hash value. In addition, assume that the secret information, such as P W D and S A L T , is shared in a secure manner, which is a prerequisite for the secure key exchange. In this case, H 1 and H 3 possess sufficient security. Since then, MITM attackers mainly attack through two methods: ( 1 ) tampering with random challenges R i or R j . If attackers change R j by R a in order to impersonate agent j in step 2, it makes H 2 H 4 in step 4, and authentication fails. Similarly, if R i is tampered with, H 5 H 6 and authentication fails. ( 2 ) tampering with the key component a x m o d   q or a y m o d   q. If a x m o d   q is changed to a z m o d   q in step 3, it makes H 2 H 4 and authentication fails. The same goes for changing a y m o d   q by a z m o d   q. Once authentication fails, the data to be transmitted will be discarded. Moreover, the confidentiality of data in MAS (1) is ensured by the negotiated K E Y . Note in Algorithm 1, x and y are secretly saved by agents i and j, respectively. Take agent i for an example; when receiving a y m o d   q from agent j, agent i can calculate the key a x y m o d   q by a y m o d q and x. Even if the eavesdropper possesses a, q, a x m o d   q and a y m o d   q, the key a x y m o d   q cannot be calculated. That is, attackers are unable to obtain the K E Y , thus ensuring the data security.
Remark 2.
The improved DHKE-based encryption–decryption mechanism is inspired by [32]. In contrast to the network attack environment in [32], this paper adopts a cryptographic-based method to achieve the secure transmission of information under MITM attacks. The data is encrypted through AES-128-GCM using the key generated by the DHKE algorithm. Meanwhile, aiming at the deficiency that the DHKE algorithm cannot perform identity authentication, an improved DHKE-based encryption–decryption mechanism is proposed. This mechanism introduces a challenge–response mechanism to complement its identity authentication function, achieving the authentication and encryption of data in the network environment, thereby resisting MITM attacks.
Algorithm 1 The improved DHKE-based EDM
Require: Hash function H ( · ) ; Function T r u n c 128 ( · ) ; Encryption algorithm A E A D . E n c A E S ( · ) ; Decryption algorithm A E A D . D e c A E S ( · ) ; Password P W D ; Random salt S A L T ; Encryption method E P W D ( · ) ; Large prime number q and it’s primitive root a; Observer state v i ( t k i j ) ; Desired formation f i ( t k i j ) ;
Ensure: Symmetric keys a x y m o d q .
  • I n i t i a l i z a t i o n : Agent i stores E P W D ( S A L T ) and agent j stores H 3 = H ( P W D | | S A L T ) locally;
  • for   k = 1 :   do
  •     Step 1  Agent i: Send signal C to agent j;
  •     Step 2  Agent j: Generate and send random challenge number R j to agent i;
  •     Step 3  Agent i: Decrypt E P W D ( S A L T ) by P W D ;
  •     Select a secret large prime number x ( x < q ) and calculate a x m o d q;
  •     Calculate H 1 = H ( P W D | | S A L T ) and H 2 = H ( H 1 | | a x m o d q | | R j ) ;
  •     Generate a challenge number R i ;
  •     Send ( H 2 | | a x m o d q | | R i ) to agent j;
  •     Step 4  Agent j: Retrieves H 3 ;
  •     Calculate H 4 = H ( H 3 | | a x m o d q | | R j ) ;
  •     if  H 4 = H 2  then
  •       Select a secret large prime number y ( y < q ) and calculate a y m o d q;
  •       Calculate H 5 = H ( H 3 | | a y m o d q | | R i ) ;
  •       Send ( H 5 | | a y m o d q) to agent i;
  •     else
  •       False;
  •     end if
  •     Step 5 Agent i: Calculate H 6 = H ( H 1 | | a y m o d q | | R i ) ;
  •     if  H 5 = H 6  then
  •       Send acknowledge character A C K to agent j;
  •     else
  •       False;
  •     end if
  •     Agent i: Get k i j = T r u n c 128 ( H ( K E Y | | i | | j ) ) ;
  •     Form plaintext v i j ( t k i j ) = ( v i T ( t k i j ) ,   f i T ( t k i j ) ) T ;
  •     Generate nonce n i j ( t k i j ) using a session counter;
  •     Set associated data a d i j ( t k i j ) = ( i , j , t k i j ) ;
  •     Compute ( c i j ( t k i j ) ,   t a g i j ( t k i j ) ) = A E A D . E n c A E S ( k i j ,   n i j ( t k i j ) ,   m i j ( t k i j ) ,   a d i j ( t k i j ) ) ;
  •     Send ( n i j ( t k i j ) ,   a d i j ( t k i j ) ,   c i j ( t k i j ) ,   t a g i j ( t k i j ) ) to agent j;
  •     Agent j:
  •     if the packet is received by agent j then
  •        v i j * ( t k i j ) = A E A D . D e c A E S ( k i j ( t k i j ) ,   n i j ( t k i j ) ,   c i j ( t k i j ) ,   a d i j ( t k i j ) ,   t a g i j ( t k i j ) ) ;
  •       if tag verification succeeds then
  •          Recover v i ( t k i j ) and f i ( t k i j ) from v i j ( t k i j ) ;
  •       else
  •          Discard the packet and set the desired value to 0;
  •       end if
  •     else
  •       Packet loss and set the desired value to 0;
  •     end if
  • end for
Security Assumptions and Discussion: This part clarifies the security assumptions, threat model, and design rationale of the proposed authentication and key exchange mechanism as follows:
(1)
Threat model and trust assumptions: We consider an open network environment where communication channels among agents are insecure and vulnerable to MITM attacks, eavesdropping, and message tampering. The proposed DHKE-based key establishment is designed under a classical adversary model. Resistance to quantum attacks (e.g., Shor’s algorithm) is beyond the scope of this work and is not considered in the present threat model. This work primarily focuses on secure formation control of MASs under classical computational assumptions. The investigation of quantum-resistant key establishment mechanisms in the context of formation control are an important direction, which is also one of the future research focuses. The primary objective of the proposed mechanism is to prevent impersonation and unauthorized key establishment during the online communication phase. It is assumed that each agent operates in a trusted execution environment. Physical capture or full logical compromise of an agent, including unrestricted access to its internal storage or runtime memory, is beyond the scope of this work. Once an agent is fully compromised, it is regarded as untrusted, and secure communication involving that agent cannot be guaranteed. This assumption is reasonable in secure control and MAS research.
(2)
Long-term credential provisioning: Each legitimate agent is provisioned with long-term credentials ( P W D and S A L T ) during an offline and secure initialization phase. These credentials are pairwise and used solely for authentication purposes. The encrypted local storage of S A L T provides a lightweight safeguard against accidental disclosure or non-invasive leakage of credentials. It is not intended to defend against full memory inspection attacks, which imply complete agent compromise and fall outside the considered threat model.
(3)
Setup and cryptographic specification: Each agent is initialized during an offline and secure setup phase. During this phase, legitimate agents are provisioned with long-term authentication credentials (e.g., P W D and S A L T ), as well as public system parameters (e.g., a and q) of the DHKE group. Meanwhile, the proposed mechanism relies on standard cryptographic primitives. The hash function H ( · ) is instantiated by a cryptographic hash (e.g., SHA-256). A symmetric session key k i j = T r u n c 128 ( H ( K E Y | | i | | j ) ) is derived from the DHKE shared secret K E Y via a hash-based KDF. Data confidentiality and integrity are ensured by an authenticated encryption with the AEDA scheme, namely AES-128-GCM, with a 128-bit key. In addition, all random values used in the protocol, including the DHKE secrets and the initial nonce counter value, are generated using a cryptographically secure pseudo-random number generator (CSPRNG).
(4)
Session key security and impact of compromise: A fresh session key is established through an authenticated DHKE. The session key is independent of long-term credentials and is used exclusively for subsequent data encryption and decryption. As a result, the compromise of a long-term credential affects only the corresponding communication links, while other links remain secure. This decentralized structure avoids system-wide security failure.
(5)
Computational considerations: The key exchange and authentication procedures are executed only after the event trigger is triggered, rather than being executed in real-time within the control loop. The secret parameters in the DHKE process are selected as large random integers and do not require online primality testing. Therefore, the computational overhead is acceptable for resource-constrained agents.
(6)
Comparison with PKI-based solutions: As shown in Table 1, the PKI-based authentication mechanism relies on digital certificates and trusted third-party institutions, as well as online management processes such as certificate issuance, verification, and revocation. This often introduces higher management and communication costs in decentralized MASs. In contrast, the proposed mechanism in this paper does not rely on certificates or third-party institutions during the system operation phase. Although P W D and S A L T require offline configuration during the initialization stage; they do not require online management mechanisms such as certificate verification or revocation afterwards. Thus, in specific MASs formation control scenarios, they have lower management complexity and operating costs. It is important to note that this proposed mechanism is not intended to replace the mature PKI-based solutions. Instead, it offers a lightweight alternative for MASs where certificate management is inconvenient or the infrastructure is limited.
(7)
Random number generation: The proposed scheme relies on cryptographically secure random numbers for generating ephemeral Diffie–Hellman private exponents and nonces used in authenticated encryption. Each agent employs a cryptographically secure pseudo-random number generator (CSPRNG) instantiated as a hash-based deterministic random bit generator (Hash-DRBG) using SHA-256. The adopted CSPRNG follows a standard DRBG architecture, in which an internal state is initialized and periodically refreshed using entropy provided by the underlying platform, and random bits are generated through iterative hash-based expansion. The Hash-DRBG is seeded by the operating system’s entropy pool, which aggregates platform-dependent entropy sources, such as system-level noise sources and, when available, hardware-assisted randomness. These entropy sources are managed by the operating system and are not controlled directly by the proposed scheme. The CSPRNG is provided by the underlying operating system or cryptographic library and utilizes standard computational resources already available on each agent, without requiring additional hardware modules or trusted third-party infrastructures.

2.3. Edge-Based ET Formation Control Protocol

The improved DHKE-based encryption–decryption mechanism proposed can effectively detect and resist MITM attacks, ensuring that the key exchange process will not be deciphered by attackers. However, in the real network environment, MASs can also be threatened by DoS attacks. The purpose of DoS attacks is to block communication between agents, thereby disrupting the normal operation of MASs. DoS attacks on MASs are typically divided into global attacks and distributed attacks. Different from the global attacks in [32,33] that occur simultaneously on all channels, the distributed DoS attacks are independent on different channels, which are more covert and complex. Inspired by [34], a distributed DoS attack model is constructed. The union of time intervals over which the channels indexed by Φ E are attacked can be expressed as
Ψ Φ ( t 1 ,   t 2 ) = ( ( i ,   j ) Φ D i j ( t 1 ,   t 2 ) ) ( i j Φ D ¯ ( i ,   j ) ( t 1 ,   t 2 ) ) ,  
where Φ ( t ) = { ( i ,   j ) E | t D i j ( 0 ,   ) } refers to the set of edges under attacks at time t, D i j ( t 1 ,   t 2 ) is the union of time intervals with attack for edge i ,   j E over t 1 ,   t 2 and D ¯ i j ( t 1 ,   t 2 ) = t 1 ,   t 2 D i j ( t 1 ,   t 2 ) is the union of the time intervals without attacks. It is obvious that t 1 ,   t 2 = Φ E Ψ Φ ( t 1 ,   t 2 ) and
D i j ( t 1 ,   t 2 ) = ( i ,   j ) Φ ,   Φ E Ψ Φ ( t 1 ,   t 2 )
hold. It can be inferred that there could be 2 | E | / 2 different sets Φ ( t ) from Φ ( t ) = ø to Φ ( t ) = E , which means that the timeline is divided into 2 | E | / 2 different types by the 2 | E | / 2 different systems topology under attacks. For the sake of simplicity, they are referred to as the attack modes. The following provides an example to intuitively explain the division of attack modes. Assume that a MAS consists of 4 agents with edges ( 1 ,   2 ) ,   ( 2 ,   3 ) and ( 2 ,   4 ) . Then, there are 2 | E | / 2 = 8 different cases indexed by Φ ( t ) , which correspond to 8 different topologies. Ψ 1 Ψ 8 correspond to the time intervals for each system topology and attack mode as shown in Figure 2.
Additionally, attackers need to consume energy before launching attacks, which means that they need to switch to a dormant state to prepare for the next attack after the last attack. Therefore, the frequency and duration of MITM and DoS attacks on each transmission channel should satisfy the following assumptions.
Assumption 1
([34]). (Attack Duration). For channel ( i ,   j ) E , there exist T d i j > 1 and μ d i j > 0 satisfying
D i j ( t 1 ,   t 2 ) μ d i j + t 2 t 1 T d i j
for any t 1 < t 2 , where D i j ( t 1 ,   t 2 ) is the union of attack intervals of edge i ,   j E over t 1 ,   t 2 .
Edge ( i ,   j ) may have been under attack at time t 1 , and μ d i j represents the length of the interval from t 1 to the end of that attack. For edge ( i ,   j ) , T d i j represents the average dwell time of two consecutive attacks off/on transitions.
The information transmission among agents in MAS (Equation (1)) is not only affected by external attacks but also constrained by internal communication resources. Frequent communication between agents will take up a large amount of bandwidth. In order to alleviate the communication burden of MAS (Equation (1)) under distributed DoS attacks, an edge-based ET formation control protocol is established as follows:
u i ( t ) = p K j N i ,   ( i ,   j ) Φ ( t ) a i j ϑ ˜ i j ( t ) + κ i ( t ) ,   t [ t k i j ,   t k + 1 i j )
where ϑ ˜ i j ( t ) = ( v ˜ i j ( t ) f i ( t ) ) ( v ˜ j i ( t ) f j ( t ) ) , v ˜ i j ( t ) = e A ( t t k i j ) v i ( t k i j ) , p is a constant, K is a feedback gain matrix to be solved and κ i ( t ) is the formation compensation input defined in (3). As shown in Equation (9), the control input of agent i relies on the reachability of its adjacent agents.
Then, define the estimation error as e i j ( t ) = v ˜ i j ( t ) v i ( t ) . The event-triggering moments of edge ( i ,   j ) are determined by
t k + 1 i j = t k i j + min { τ k i j ,   τ } | τ k i j = t t k i j > 0 , w h e n h i j ( t ) 0 ,
where τ is an upper bound on the interval between two triggering moments and the triggering function of edge ( i ,   j ) is
h i j ( t ) = 1 4 ϑ ˜ i j T ( t ) Γ ϑ ˜ i j ( t ) + e i j T ( t ) Γ e i j ( t ) μ i j e ν i j t
h j i ( t ) = 1 4 ϑ ˜ j i T ( t ) Γ ϑ ˜ j i ( t ) + e j i T ( t ) Γ e j i ( t ) μ j i e ν j i t ,
where Γ is a constant design matrix and μ i j e ν i j t is the threshold of triggering function with μ i j and ν i j being given positive constants.
Remark 3.
The ET mechanism has been widely used to save communication resources. As the edge-based ET mechanism (Equations (10) and (11)) is designed, events on each edge connected to agent i are triggered independently, and only when the trigger condition is met will the two agents on edge ( i ,   j ) exchange information. In the meantime, τ is used to force events on edge ( i ,   j ) to be triggered in case there is no communication for a long time. Therefore, compared with the node-based trigger mechanism in [35,36,37], which needs to broadcast information to all neighbors at triggering moments, the method proposed in Equations (10) and (11) can alleviate the communication pressure in MAS (Equation (1)) because not all neighbor agents need to update their status at triggering moments.
Define ϑ ( t ) = ϑ 1 T ( t ) ,   ϑ 2 T ( t ) ,   ,   ϑ N T ( t ) T , η ( t ) = η 1 T ( t ) ,   η 2 T ( t ) ,   η N T ( t ) and the formation error ξ ( t ) = ξ 1 T ( t ) ,   ,   ξ N T ( t ) T , where ϑ i ( t ) = v i ( t ) f i ( t ) , η i ( t ) = ϑ i ( t ) ( 1 / N ) j = 1 N ϑ j ( t ) and ξ i ( t ) = ( x i ( t ) f i ( t ) ) ( 1 / N ) j = 1 N ( x j ( t ) f j ( t ) ) , i = 1 ,   ,   N . It can be obtained from Equations (1), (2), (3) and (9) that the following applies:
Let ω i ( t ) = x i ( t ) f i ( t ) . From Equations (1) and (3) we can obtain
ω ˙ i ( t ) = A ω i ( t ) + A f i ( t ) + B u i ( t ) f ˙ i ( t ) = A ω i ( t ) + B ( u i ( t ) κ i ( t ) ) .
Then, we can obtain the derivative of ξ i ( t ) from Equation (12) and the fact that ϑ ˜ i j ( t ) = ϑ ˜ j i ( t ) ,
ξ ˙ i ( t ) = ω ˙ i ( t ) ( 1 / N ) j = 1 N ω ˙ j ( t ) = A ω i ( t ) + B ( u i ( t ) κ i ( t ) ) ( 1 / N ) j = 1 N A ω j ( t ) + B ( u j ( t ) κ j ( t ) ) = A ( ω i ( t ) ( 1 / N ) j = 1 N ω j ( t ) ) + p B K ( j N i ,   ( i ,   j ) Φ ( t ) N a i j ϑ ˜ i j ( t ) ( 1 / N ) k = 1 N j N i ,   ( i ,   j ) Φ ( t ) N a k j ϑ ˜ k j ( t ) ) = A ξ i ( t ) + p B K j N i ,   ( i ,   j ) Φ ( t ) N a i j ϑ ˜ i j ( t ) .
From Equations (2) and (3) and the definition of θ i ( t ) , the derivative of θ i ( t ) can be obtained as
θ ˙ i ( t ) = v ˙ i ( t ) f ˙ i ( t ) = A v i ( t ) + B u i ( t ) + F ( C v i ( t ) y i ( t ) ) f ˙ i ( t ) = A θ i ( t ) + ( A f i ( t ) f ˙ i ( t ) ) + B u i ( t ) + F C θ i ( t ) + ( F C f i ( t ) F C x i ( t ) ) = ( A + F C ) θ i ( t ) + p B K j N i ,   ( i ,   j ) Φ ( t ) a i j ϑ ˜ i j ( t ) F C ω i ( t ) .
Then the derivative of η i ( t ) is
η ˙ i ( t ) = θ ˙ i ( t ) ( 1 / N ) j = 1 N θ ˙ j ( t ) = ( A + F C ) θ i ( t ) ( 1 / N ) j = 1 N θ j ( t ) F C ω i ( t ) j = 1 N ω j ( t ) + B p K j N i ,   ( i ,   j ) Φ ( t ) N a i j ϑ ˜ i j ( t ) 1 N p K k = 1 N j N i ,   ( i ,   j ) Φ ( t ) N a k j ϑ ˜ k j ( t ) = ( A + F C ) η i ( t ) + p B K j N i ,   ( i ,   j ) Φ ( t ) N a i j ϑ ˜ i j ( t ) F C ξ i ( t ) = A η i ( t ) + p B K j N i ,   ( i ,   j ) Φ ( t ) N a i j ϑ ˜ i j ( t ) + F C ( η i ( t ) ξ i ( t ) )
Let the observer error be defined as ε i ( t ) = η i ( t ) ξ i ( t ) . Then, it follows that
ε ˙ i ( t ) = ( A + F C ) ε i ( t )
and
η ˙ i ( t ) = A η i ( t ) + p B K j N i ,   ( i ,   j ) Φ ( t ) N a i j ϑ ˜ i j ( t ) + F C ε i ( t ) .
The objective of this article is to design an edge-based ET formation control protocol (Equation (9)) for MAS (Equation (1)) such that the formation can be achieved under hybrid attacks. That is, lim t ε i ( t ) = 0 and lim t η i ( t ) = 0 hold.
The subsequent proof relies on the following lemma:
Lemma 1
([38]). For an undirected graph, zero is a simple eigenvalue of L , if and only if the graph is connected. The smallest nonzero eigenvalue λ 2 of L satisfies λ 2 ( L ) = min x 0 ,   1 T x = 0 x T L x x T x .

3. Results

In this part, Theorem 1 provides sufficient conditions for the MAS (Equation (1)) formation to be achievable in the presence of hybrid attacks. Meanwhile, Theorem 2 proves that Zeno behavior will not occur under the trigger mechanism (Equation (10)).
Theorem 1.
Suppose that ( A ,   B ,   C ) is stabilizable and detectable. Consider the MAS (1) with the edge-based ET mechanism (Equation (10)) and control protocol (Equation (9)) under hybrid attacks, for given scalars α Φ , if there exist symmetric matrices P, Q such that P > 0 and Q > 0 , matrices K = B T P , F = Q C T , Γ = P B B T P , scalars ϰ 1 i j and ϰ 2 i j subject to the following conditions:
φ ( t ) + φ ˙ ( t ) < α Φ φ ( t ) ,
P A + A T P + 1 2 I P B B T P < α Φ P ,
Q A T + A Q Q C T C Q + I = 0 ,
ϰ 1 i j ϰ 2 i j 0 ,
α Φ ( ( i ,   j ) Φ ϰ 1 i j + ( i ,   j ) E Φ ϰ 2 i j ) ,
1 T ¯ = ( i ,   j ) E ( 1 T d i j ϰ 1 i j + ( 1 1 T d i j ) ϰ 2 i j ) < 0 ,
where φ ( t ) = p i = 1 N j N i ,   ( i ,   j ) Φ ( t ) N a i j μ i j e v i j t , p > [ 1 / ( λ 2 ( L Φ ) ) ] and ρ | | P F C | | 2 > 0 , the desired time-varying formation under distributed hybrid attacks can be achieved.
Proof. 
Consider the Lyapunov candidate function V ( t ) = V ε ( t ) + V η ( t ) + φ ( t ) with
V η ( t ) = 1 2 i = 1 N η i ( t ) T P η i ( t ) ,
V ε ( t ) = ε T ( t ) ( I N H ) ε ( t ) ,
φ ( t ) = p i = 1 N j N i ,   ( i ,   j ) Φ ( t ) N a i j μ i j e ν i j t .
According to Equations (16) and (17), the time derivative of V η ( t ) is given by
V ˙ η ( t ) = η T ( t ) ( I N P A ) η ( t ) + p i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j η i ( t ) T P B K ϑ ˜ i j ( t ) + η T ( t ) ( I N P F C ) ε ( t ) .
Based on the fact i = 1 N j N i ,   ( i ,   j ) Φ ( t ) η i ( t ) Γ ϑ ˜ i j ( t ) = i = 1 N j N i ,   ( i ,   j ) Φ ( t ) η j ( t ) Γ ϑ ˜ j i ( t ) , Γ = P B B T P and K = B T P , it can be deduced that
i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j η i ( t ) T P B K ϑ ˜ i j ( t ) = i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j η i ( t ) Γ ϑ ˜ i j ( t ) = 1 2 i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j [ η i T ( t ) Γ ϑ ˜ i j ( t ) + η j T ( t ) Γ ϑ ˜ j i ( t ) ] = 1 2 i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j ( η i ( t ) η j ( t ) ) T Γ ϑ ˜ i j ( t ) .
Meanwhile, according to the definition of ϑ ˜ i j ( t ) , one obtains
ϑ ˜ i j ( t ) = ( v ˜ i j ( t ) f i ( t ) ) ( v ˜ j i ( t ) f j ( t ) ) = v i ( t ) + e i j ( t ) f i ( t ) v j ( t ) + e j i ( t ) f j ( t ) = v i ( t ) f i ( t ) v j ( t ) f j ( t ) + e i j ( t ) e j i ( t ) = ϑ i ( t ) ϑ j ( t ) + e i j ( t ) e j i ( t ) = η i ( t ) η j ( t ) + e i j ( t ) e j i ( t ) .
Then, the following formula holds:
i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j η i ( t ) T P B K ϑ ˜ i j ( t ) = 1 2 i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j η i ( t ) η j ( t ) T Γ η i ( t ) η j ( t ) 1 2 i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j η i ( t ) η j ( t ) T Γ e i j ( t ) e j i ( t ) = 1 2 i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j η i ( t ) η j ( t ) T Γ η i ( t ) η j ( t ) 1 2 i = 1 N j N i ,   ( i ,   j ) Φ ( t ) 1 2 a i j [ ϑ ˜ i j T ( t ) Γ ϑ ˜ i j T ( t ) η i ( t ) η j ( t ) T Γ ( η i ( t ) η j ( t ) e i j ( t ) e j i ( t ) T Γ e i j ( t ) e j i ( t ) ] = 1 2 i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j η i T ( t ) Γ η i ( t ) η j ( t ) 1 4 i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j ϑ ˜ i j T ( t ) Γ ϑ ˜ i j T ( t ) + 1 4 i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j e i j T ( t ) e j i T Γ e i j ( t ) e j i T ( t ) 1 2 i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j η i T ( t ) Γ ( η i ( t ) η j ( t ) ) 1 4 i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j ϑ ˜ i j T ( t ) Γ ϑ ˜ i j ( t ) + i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j e i j T ( t ) Γ e i j ( t ) 1 2 i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j η i T ( t ) Γ η i ( t ) η j ( t ) + i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j μ i j e ν i j t .
By using Young’s inequality x T y a 2 x 2 + 1 2 a y 2 , it can be obtained that
η T ( t ) ( I N P F C ) ε ( t ) P F C 2 ε T ( t ) ε ( t ) + η T ( t ) η ( t ) 4 .
Owing to A + F C being Hurwitz, there exists a matrix R satisfying R > 0 and ( A + F C ) T R + R ( A + F C ) = ϱ I with ϱ 0 [39]. Then, taking the time derivative of V ε yields
V ˙ ε ( t ) = ε T ( t ) { I N [ ( A + F C ) T R + R ( A + F C ) ] } ε ( t ) = ϱ ε T ( t ) ε ( t ) .
Combining Equations (24)–(29) yields
V ˙ ( t ) η T ( t ) ( I N P A ) η ( t ) p 2 i = 1 N j N i ,   ( i ,   j ) Φ ( t ) a i j η i T ( t ) Γ η i ( t ) η j ( t ) + φ ( t ) + η T ( t ) η ( t ) 4 + φ ˙ ( t ) ( ρ | | P F C | | 2 ) ε T ( t ) ε ( t ) = 1 2 η T ( t ) I N ( P A + A T P + 1 2 I ) p L Φ Γ η ( t ) ( ρ | | P F C | | 2 ) ε T ( t ) ε ( t ) + φ ( t ) + φ ˙ ( t )
Noting the fact that ( 1 T I n ) η ( t ) = 0 and using Lemma 1, we can obtain that η T ( t ) ( L Φ Γ ) η ( t ) λ 2 ( L Φ ) η T ( t ) ( I N Γ ) η ( t ) . Since p [ 1 / λ 2 ( L Φ ) ] , it is obvious that p η T ( t ) ( L Φ Γ ) η ( t ) η T ( t ) ( I Γ ) η ( t ) holds, and hence, it can be concluded that
V ˙ ( t ) 1 2 η T ( t ) I N ( P A + A T P + 1 2 I P B B T P ) η ( t ) β ε T ( t ) ε ( t ) + φ ( t ) + φ ˙ ( t )
where β = ϱ P F C 2 . If the conditions in Equations (18)–(20) hold, it is easy to obtain that
V ˙ ( t ) < α Φ V ( t ) .
Define ς k ( k N , ς 0 = 0 ) as the time instants where the attack mode changes. For t [ ς k ,   ς k + 1 ) , it can be concluded from V ˙ ( t ) < α Φ V ( t ) that
V ( t ) e α Φ ( ς k ) ( t ς k ) V ( ς k ) e J k V ( ς 0 ) = e J ( 0 ,   t ) V ( 0 ) ,
where J k = α Φ ( ς k ) ( t ς k ) + s = 1 k α Φ ( ς s 1 ) ( ς s ς s 1 ) and J ( 0 ,   t ) = Φ E α Φ | Ψ Φ ( 0 ,   t ) | . Then, from Equations (7), (8) and (22) and the fact that Φ E ,   ( i ,   j ) Φ | Ψ Φ ( 0 ,   t ) | = | [ 0 ,   t ] D i j ( 0 ,   t ) | = t | D i j ( 0 ,   t ) | ,
J ( 0 ,   t ) Φ E ( i ,   j ) Φ ϰ 1 i j + ( i ,   j ) E Φ ϰ 2 i j | Ψ Φ ( 0 ,   t ) | = ( i ,   j ) E ϰ 1 i j Φ E ,   ( i ,   j ) Φ | Ψ Φ ( 0 ,   t ) | + ϰ 2 i j Φ E ,   ( i ,   j ) Φ | Ψ Φ ( 0 ,   t ) | = ( i ,   j ) E ( ϰ 1 i j ϰ 2 i j ) | D i j ( 0 ,   t ) | + ϰ 2 i j t ( i ,   j ) E ( ϰ 1 i j ϰ 2 i j ) μ d i j + ( i ,   j ) E ϰ 1 i j 1 T d i j + ϰ 2 i j ( 1 1 T d i j ) t = μ ¯ + 1 T ¯ t .
Based on Equations (33) and (34), it can be obtained that V ( t ) < V ( 0 ) e ( μ ¯ | | 1 T ¯ | | t ) , that is, lim t ε ( t ) = 0 and lim t η ( t ) = 0 . □
Remark 4.
In Algorithm 1, when some of the links are subjected to MITM attacks, the transmitted data packets will be directly discarded, which is equivalent to a blockage occurring at these links. Therefore, Algorithm 1 treats the MITM attacks on the links as DoS attacks. Hence, in an environment that may be subject to both MITM and DoS attacks, any attack received can be regarded as a DoS attack. So, the stability analysis holds for any combination of the two types of attacks.
Theorem 2.
Zeno behavior will not occur under the trigger mechanism (Equation (10)).
Proof. 
Assume that Zeno behavior occurs at the edge ( i ,   j ) , which means there exists T such that lim k t k i j = T . Then for any Ξ > 0 , there exists Υ Z 0 , such that T Ξ < t m i j T for any m Υ . Because η and ξ are bounded, ϑ ˜ i j is bounded too in finite time. Compute the derivative of e i j ( t ) as
e ˙ i j ( t ) = A e i j ( t ) p B K j = 0 N a i j ϑ ˜ i j ( t )
It follows that
| | e ˙ i j ( t ) | | | | A | | | | e i j ( t ) | | + ζ i j ( t )
where ζ i j ( t ) is the upper bound of | | p B K j = 0 N a i j ϑ ˜ i j ( t ) | | for t t k i j ,   t k + 1 i j .
Define a non-negative function ϖ ( t ) satisfying
ϖ ˙ ( t ) = | | A | | ϖ ( t ) + ζ i j ( t )
and ϖ ( 0 ) = | | e i j ( t k i j ) | | = 0 . Therefore, | | e i j ( t ) | | ϖ ( t t k i j ) , where ϖ ( t ) = [ ζ i j ( t ) / | | A | | ] ( e | | A | | t 1 ) satisfies Equation (37).
Note that the edge ( i ,   j ) is not triggered, which means the triggering functions (Equation (11)) are less than 0, if the following two inequalities hold:
| | e i j | | μ i j | | P B B T P | | e υ i j 2 T
| | e j i | | μ j i | | P B B T P | | e υ j i 2 T .
Let Ξ i j = 1 2 | | A | | ln ( 1 + | | A | | ζ i j ( μ i j / | | P B B T P | | ) e υ i j 2 T ) and Ξ j i = 1 2 | | A | | ln ( 1 + | | A | | ζ j i ( μ j i / | | P B B T P | | ) e υ j i 2 T ) . Denote Ξ = min { Ξ i j ,   Ξ j i } . Then, according to (38), the time interval between t k i j and t k + 1 i j satisfies t k + 1 i j t k i j 2 Ξ , which further implies that t k + 1 i j t k i j + 2 Ξ > T + Ξ . This contradicts the assumption that T Ξ < t k + 1 i j T . Thus, there does not exist the Zeno behavior. □

4. Simulation Example

In this section, numerical simulations are conducted to verify the effectiveness of the improved DHKE-based encryption–decryption mechanism and the proposed edge-based ET formation control protocol. In this simulation example, a third-order MAS with 5 agents achieves time-varying formation under formation control protocol (Equation (9)) and event trigger mechanism (Equation (10)).
Consider MAS (Equation (1)) with five agents, where
A = 1 0 1 0 1 0 0.5 0 1 ,   B = 2 0 0 0 1 0 0 0 1 ,   C = 1 0 0 0 2 0 0 0.5 1 .
The communication relationship between agents is shown in Figure 3 and the initial values of each agent are x 1 ( 0 ) = [ 0.18 ,   0.04 ,   0.12 ] T ,   x 2 ( 0 ) = [ 0.13 ,   0.14 ,   0.63 ] T ,   x 3 ( 0 ) = [ 0.03 ,   0.42 ,   0.12 ] T ,   x 4 ( 0 ) = [ 0.55 ,   0.54 ,   0.01 ] T and x 5 ( 0 ) = [ 0.79 ,   0.03 ,   0.70 ] T . The desired formation function is described as
f i ( t ) = sin ( 2 t + 2 5 ( i 1 ) π ) cos ( 2 t + 2 5 ( i 1 ) π ) sin ( 2 t + 2 5 ( i 1 ) π ) ,
for i { 1 ,   2 ,   ,   5 } . If the desired time-varying formation f ( t ) = [ f 1 T ( t ) ,   f 2 T ( t ) ,   ,   f 5 T ( t ) ] T is formed, these five agents will be located at the five vertices of a regular pentagon and maintain an angular velocity rotation of 2 rad / s .
Choose μ i j = 0.1 , ν i j = 0.4 , τ = 0.5 and α Φ = 0.1 . From Theorem 1, the gain matrices can be obtained as
K = 0.6953 0 0.3576 0 0.4142 0 0.0050 0 0.4321 ,   Γ = 0.4834 0 0.2508 0 0.1715 0 0.2508 0 0.3146
and
F = 0.4802 0.0237 0.2463 0.0118 0.6106 0.1279 0.2522 0.0494 0.5536 .
Under the condition that the sampling step size is 0.01 s, the time t was simulated from 0 s to 10 s using MATLAB (version R2025a) software.
Figure 4 shows the attack situation on each edge, with the green area representing the attack interval. For convenience, only the attack situations on edge ( 1 ,   2 ) and ( 2 ,   3 ) are shown. Under the improved DHKE-based encryption–decryption mechanism, the two communicating agents will first generate a confidentiality key based on Algorithm 1, and then the sender encrypts the data with this key before transmitting it. After receiving the encrypted data, the recipient decrypts it using the key to obtain the original data.
Figure 5 shows (a) the norm of the formation error E ( t ) = 1 2 | | ξ 4 ( t ) | | 2 + | | ξ 5 ( t ) | | 2 of the two agents on edge ( 4 ,   5 ) without MITM attacks and (b) the same for the case with MITM attacks. For the sake of simplicity, since the data packets that suffer from MITM attacks in Algorithm 1 will be directly discarded, this can equivalently convert the MITM attacks into DoS attacks. Therefore, only the MITM attacks are considered here. It can be seen that without MITM attacks, the convergence of E ( t ) is relatively gentle. However, when subjected to the MITM attack, E ( t ) fluctuates briefly within the attack range, but it can continue to converge after the attack is over. This indicates that the method used in this work can enable the formation to recover from the attack and will not affect the final realization of the formation.
Figure 6 describes the state observation error of each agent, and it can be seen that the error approaches 0. The formation situation of MAS is shown in Figure 7, where Figure 7a presents the agents’ position trajectory within 10 s and Figure 7b shows the formation snapshots of the 5 agents every two seconds. In addition, the formation error is shown in Figure 8, and it is easy to see that the formation shape is gradually stabilizing. The event-triggering instants of each edge are illustrated in Figure 9, which shows that inter-agent communication occurs only when the triggering conditions are satisfied, thereby reducing the communication frequency.
Meanwhile, we compared the mechanism designed in this paper based on DHKE with the mechanism based on PKI authentication. The PKI-based mechanism adopts certificate-based authentication using ECDSA, combined with ECDHE for session key establishment. The computational overhead (CO) and formation convergence time (CT) of MAS formation control are presented in Table 2. It should be noted that the CO calculated in this paper refers to the duration of time from the moment the event is triggered until the completion of data encryption. Moreover, the encryption and decryption methods of both schemes employ AES-128-GCM. As shown in Table 2, the CO of the PKI-based mechanism is 16.73 ms, and the CT is 12.55 s. The CO and CT of the DHKE-based mechanism are 9.46 ms and 9.27 s, respectively. From the above data, it can be seen that compared with the PKI-based mechanism, the designed scheme reduces the CO by 43.4% and the convergence time of the formation by 26.1%. Overall, compared with the PKI-based mechanism, the mechanism designed in this paper has lower CO in the authentication and key establishment stages, and the CT of the formation is also faster. Therefore, this scheme provides a lightweight security communication option for MASs formation control scenarios where certificate management is inconvenient or the infrastructure is limited.

5. Conclusions

This paper studies the formation control problem of general linear MASs subject to hybrid attacks. An improved encryption–decryption mechanism based on DHKE is designed. This mechanism can resist MITM attacks and encrypt the data to guarantee the confidentiality and integrity of the data. Further, by proposing an edge-based ET formation control strategy, the communication frequency between agents is reduced and the influence of DoS attacks is resisted. Finally, under hybrid attacks, stability of the MASs is rigorously analyzed. Numerical simulations further verify that the formation error remains bounded and converges despite malicious interference. The findings indicate that the issues of communication security and formation control stability can be solved by the method we proposed.
Future research will investigate the integration of post-quantum key establishment techniques into secure formation control frameworks, aiming to address emerging threat models while maintaining control performance.

Author Contributions

Methodology, K.L. and L.Z.; validation, K.L.; investigation, L.Z.; writing—original draft, K.L.; writing—review and editing, K.L., L.Z. and R.Z.; supervision, R.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Dorri, A.; Kanhere, S.S.; Jurdak, R. Multi-agent systems: A survey. IEEE Access 2018, 6, 28573–28593. [Google Scholar] [CrossRef]
  2. Mohsan, S.A.H.; Khan, M.A.; Noor, F.; Ullah, I.; Alsharif, M.H. Towards the unmanned aerial vehicles (UAVs): A comprehensive review. Drones 2022, 6, 147. [Google Scholar] [CrossRef]
  3. Mahela, O.P.; Khosravy, M.; Gupta, N.; Khan, B.; Alhelou, H.H.; Mahla, R.; Patel, N.; Siano, P. Comprehensive overview of multi-agent systems for controlling smart grids. CSEE J. Power Energy Syst. 2020, 8, 115–131. [Google Scholar] [CrossRef]
  4. Rizk, Y.; Awad, M.; Tunstel, E.W. Cooperative heterogeneous multi-robot systems: A survey. ACM Comput. Surv. (CSUR) 2019, 52, 1–31. [Google Scholar] [CrossRef]
  5. Ge, X.; Han, Q.L. Distributed formation control of networked multi-agent systems using a dynamic event-triggered communication mechanism. IEEE Trans. Ind. Electron. 2017, 64, 8118–8127. [Google Scholar] [CrossRef]
  6. Das, B.; Subudhi, B.; Pati, B.B. Formation control of underwater vehicles using Multi Agent System. Arch. Control Sci. 2020, 30, 365–384. [Google Scholar] [CrossRef]
  7. Zhao, G.; Cui, H.; Hua, C. Hybrid event-triggered bipartite consensus control of multiagent systems and application to satellite formation. IEEE Trans. Autom. Sci. Eng. 2022, 20, 1760–1771. [Google Scholar] [CrossRef]
  8. Feng, Z.; Hu, G. Distributed secure average consensus for linear multi-agent systems under DoS attacks. In Proceedings of the 2017 American Control Conference (ACC), Seattle, WA, USA, 24–26 May 2017; pp. 2261–2266. [Google Scholar]
  9. Zhang, R.; Liu, L.; Park, J.H.; Zeng, D.; Xie, X. Secure Consensus for Multi-Agent Systems with Euler–Lagrange Dynamics and Multiple DoS Attacks. IEEE Trans. Intell. Transp. Syst. 2025, 26, 10008–10018. [Google Scholar] [CrossRef]
  10. Zhang, R.; Wang, H.; Park, J.H.; Zeng, D.; Xiao, J. Resilient secure synchronization for complex networks under DoS attacks: A new switching sampled-data control protocol. IEEE Trans. Syst. Man, Cybern. Syst. 2024, 55, 1492–1505. [Google Scholar] [CrossRef]
  11. Chen, M.; Zhang, R.; Liu, L.; Zeng, D.; Zhang, L.; Xiao, J. Secure Consensus of MASs Subject to DoS Attacks: A New Dynamic-Memory-Weight-Dependent Security Control Protocol. IEEE Trans. Syst. Man Cybern. Syst. 2025, 55, 9722–9737. [Google Scholar] [CrossRef]
  12. Ma, Y.S.; Che, W.W.; Deng, C.; Wu, Z.G. Observer-based event-triggered containment control for MASs under DoS attacks. IEEE Trans. Cybern. 2021, 52, 13156–13167. [Google Scholar] [CrossRef]
  13. Zhang, Z.; Dong, J. Fault-tolerant containment control for IT2 fuzzy networked multiagent systems against denial-of-service attacks and actuator faults. IEEE Trans. Syst. Man Cybern. Syst. 2021, 52, 2213–2224. [Google Scholar] [CrossRef]
  14. Jiang, Y.; Niu, B.; Wang, X.; Zhao, X.; Wang, H.; Yan, B. Distributed finite-time consensus tracking control for nonlinear multi-agent systems with FDI attacks and application to single-link robots. IEEE Trans. Circuits Syst. II Express Briefs 2022, 70, 1505–1509. [Google Scholar] [CrossRef]
  15. He, W.; Xu, W.; Ge, X.; Han, Q.L.; Du, W.; Qian, F. Secure control of multiagent systems against malicious attacks: A brief survey. IEEE Trans. Ind. Inform. 2021, 18, 3595–3608. [Google Scholar] [CrossRef]
  16. Ding, T.; Zhu, S.; He, J.; Chen, C.; Guan, X. Differentially private distributed optimization via state and direction perturbation in multiagent systems. IEEE Trans. Autom. Control 2021, 67, 722–737. [Google Scholar] [CrossRef]
  17. Gao, C.; Wang, Z.; He, X.; Liu, Y.; Yue, D. Differentially private consensus control for discrete-time multiagent systems: Encoding–decoding schemes. IEEE Trans. Autom. Control 2024, 69, 5554–5561. [Google Scholar] [CrossRef]
  18. Gao, C.; Wang, Z.; He, X.; Dong, H. Fault-tolerant consensus control for multiagent systems: An encryption-decryption scheme. IEEE Trans. Autom. Control 2021, 67, 2560–2567. [Google Scholar] [CrossRef]
  19. Gao, C.; Wang, Z.; He, X.; Dong, H. Encryption–decryption-based consensus control for multi-agent systems: Handling actuator faults. Automatica 2021, 134, 109908. [Google Scholar] [CrossRef]
  20. Zhang, S.; Ma, L.; Yi, X. Model-free adaptive control for nonlinear multi-agent systems with encoding-decoding mechanism. IEEE Trans. Signal Inf. Process. Over Netw. 2022, 8, 489–498. [Google Scholar] [CrossRef]
  21. Zhao, Y.; Chen, J. A survey on differential privacy for unstructured data content. ACM Comput. Surv. (CSUR) 2022, 54, 1–28. [Google Scholar] [CrossRef]
  22. Jiang, H.; Pei, J.; Yu, D.; Yu, J.; Gong, B.; Cheng, X. Applications of differential privacy in social network analysis: A survey. IEEE Trans. Knowl. Data Eng. 2021, 35, 108–127. [Google Scholar] [CrossRef]
  23. Darup, M.S.; Alexandru, A.B.; Quevedo, D.E.; Pappas, G.J. Encrypted control for networked systems: An illustrative introduction and current challenges. IEEE Control Syst. Mag. 2021, 41, 58–78. [Google Scholar] [CrossRef]
  24. Gao, L.; Deng, S.; Ren, W. Differentially private consensus with an event-triggered mechanism. IEEE Trans. Control Netw. Syst. 2018, 6, 60–71. [Google Scholar] [CrossRef]
  25. Wang, A.; Liao, X.; He, H. Event-triggered differentially private average consensus for multi-agent network. IEEE/CAA J. Autom. Sin. 2019, 6, 75–83. [Google Scholar] [CrossRef]
  26. Wang, A.; He, H.; Liao, X. Event-triggered privacy-preserving average consensus for multiagent networks with time delay: An output mask approach. IEEE Trans. Syst. Man Cybern. Syst. 2019, 51, 4520–4531. [Google Scholar] [CrossRef]
  27. Cheng, B.; Li, Z. Coordinated tracking control with asynchronous edge-based event-triggered communications. IEEE Trans. Autom. Control 2019, 64, 4321–4328. [Google Scholar] [CrossRef]
  28. Zhao, H.; Meng, X.; Wu, S. Distributed edge-based event-triggered coordination control for multi-agent systems. Automatica 2021, 132, 109797. [Google Scholar] [CrossRef]
  29. Zhang, J.; Zhang, H.; Sun, S.; Gao, Z. Leader-follower consensus control for linear multi-agent systems by fully distributed edge-event-triggered adaptive strategies. Inf. Sci. 2021, 555, 314–338. [Google Scholar] [CrossRef]
  30. Wang, H.; Shan, J.; Alkomy, H. Fully distributed edge-based dynamic event-triggered control for multiple quadrotors. IEEE/ASME Trans. Mechatronics 2024, 29, 3203–3214. [Google Scholar] [CrossRef]
  31. Li, X.; Dong, X.; Li, Q.; Ren, Z. Event-triggered time-varying formation control for general linear multi-agent systems. J. Frankl. Inst. 2019, 356, 10179–10195. [Google Scholar] [CrossRef]
  32. Guo, X.G.; Wang, B.Q.; Wang, J.L.; Ahn, C.K.; Wu, Z.G. Edge-event-triggered encryption-decryption observer-based control of multiagent systems for privacy protection under multiple cyber attacks. Inf. Sci. 2023, 642, 119128. [Google Scholar] [CrossRef]
  33. Cao, H.; Han, L.; Li, D.; Hu, Q. Fully distributed dynamic event-triggering formation control for multi-agent systems under DoS attacks: Theory and experiment. Neurocomputing 2023, 552, 126546. [Google Scholar] [CrossRef]
  34. Lu, A.Y.; Yang, G.H. Distributed consensus control for multi-agent systems under denial-of-service. Inf. Sci. 2018, 439, 95–107. [Google Scholar] [CrossRef]
  35. Liu, H.; Wen, G.; Peng, Z.; Wang, J.L.; Huang, T. Fully distributed consensus control for linear multiagent systems with dynamic double-event-triggered mechanism. IEEE Trans. Circuits Syst. II Express Briefs 2021, 69, 1262–1266. [Google Scholar] [CrossRef]
  36. Li, S.; Liang, K.; He, W. Fully distributed event-triggered secure consensus of general linear multi-agent systems under sequential scaling attacks. ISA Trans. 2022, 127, 146–155. [Google Scholar] [CrossRef]
  37. Zhao, N.; Zhan, X.; Wu, J.; Han, T.; Yan, H. Guaranteed-performance consensus control for multi-agent systems with external disturbances via event-triggered strategy. Neurocomputing 2024, 574, 127268. [Google Scholar] [CrossRef]
  38. Li, Z.; Duan, Z. Cooperative Control of Multi-Agent Systems: A Consensus Region Approach; CRC Press: Boca Raton, FL, USA, 2017. [Google Scholar]
  39. Chen, C.T. Linear System Theory and Design; Saunders College Publishing: Philadelphi, PA, USA, 1984. [Google Scholar]
Figure 1. (a) Communication structure diagram of MAS. (b) Key exchange flowchart.
Figure 1. (a) Communication structure diagram of MAS. (b) Key exchange flowchart.
Electronics 15 00401 g001
Figure 2. Example of 8 different DoS attack modes.
Figure 2. Example of 8 different DoS attack modes.
Electronics 15 00401 g002
Figure 3. Communication graph.
Figure 3. Communication graph.
Electronics 15 00401 g003
Figure 4. Attack status of each edge within 10 s.
Figure 4. Attack status of each edge within 10 s.
Electronics 15 00401 g004
Figure 5. (a) Normal Encrypted Communication. (b) Encrypted Communication under MITM attacks.
Figure 5. (a) Normal Encrypted Communication. (b) Encrypted Communication under MITM attacks.
Electronics 15 00401 g005
Figure 6. The state observation error within 10 s.
Figure 6. The state observation error within 10 s.
Electronics 15 00401 g006
Figure 7. (a) The agents position trajectory within 10 s. (b) The shape changes in the formation every 2 s.
Figure 7. (a) The agents position trajectory within 10 s. (b) The shape changes in the formation every 2 s.
Electronics 15 00401 g007
Figure 8. The formation error within 10 s.
Figure 8. The formation error within 10 s.
Electronics 15 00401 g008
Figure 9. Triggering time within 10 s.
Figure 9. Triggering time within 10 s.
Electronics 15 00401 g009
Table 1. Comparison between PKI-based mechanism and the proposed lightweight DHKE-based mechanism.
Table 1. Comparison between PKI-based mechanism and the proposed lightweight DHKE-based mechanism.
PKI-Based MechanismProposed DHKE-Based Mechanism
Authentication mechanismDigital certificates with public-key signatures (e.g., RSA)Challenge–response authentication based on long-term credentials
Trusted third partyRequiredNot required
Runtime certificate managementCertificate validation and revocationNo certificate management required
Long-term credentialsPrivate key and digital certificatePWD and SALT
Credential updateCertificate re-issuance and redistributionOffline re-provisioning
Suitability for decentralized MASsLimited by infrastructureMore suitable for infrastructure-less MASs
Table 2. Comparison of CT and CO under Different Security Mechanisms for MAS (1).
Table 2. Comparison of CT and CO under Different Security Mechanisms for MAS (1).
Security SchemeCO (per Event [ms])CT (s)
PKI-based16.7312.55
DHKE-based9.469.27
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

Liu, K.; Zhang, R.; Zhang, L. An Improved DHKE-Based Encryption–Decryption Mechanism for Formation Control of MASs Under Hybrid Attacks. Electronics 2026, 15, 401. https://doi.org/10.3390/electronics15020401

AMA Style

Liu K, Zhang R, Zhang L. An Improved DHKE-Based Encryption–Decryption Mechanism for Formation Control of MASs Under Hybrid Attacks. Electronics. 2026; 15(2):401. https://doi.org/10.3390/electronics15020401

Chicago/Turabian Style

Liu, Kairui, Ruimei Zhang, and Linli Zhang. 2026. "An Improved DHKE-Based Encryption–Decryption Mechanism for Formation Control of MASs Under Hybrid Attacks" Electronics 15, no. 2: 401. https://doi.org/10.3390/electronics15020401

APA Style

Liu, K., Zhang, R., & Zhang, L. (2026). An Improved DHKE-Based Encryption–Decryption Mechanism for Formation Control of MASs Under Hybrid Attacks. Electronics, 15(2), 401. https://doi.org/10.3390/electronics15020401

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