Skip to Content
ComputersComputers
  • Article
  • Open Access

24 September 2026

38 Pages

A Secured Parallel Multi-Broker MQTT Framework with Chaos-Enhanced Hybrid Encryption for Repetition-Resistant IoT Security

,
and
1
Department of Computers, College of Education, Mustansiriya University, Baghdad 10052, Iraq
2
College of Computing and Informatics, Universiti Tenaga Nasional, Kajang 43000, Selangor, Malaysia
3
Institute of Informatics and Computing in Energy, Universiti Tenaga Nasional, Kajang 43000, Selangor, Malaysia
*
Author to whom correspondence should be addressed.

Abstract

The proliferation of IoT deployments has exposed critical vulnerabilities in MQTT-based systems, particularly ciphertext-repetition leakage in telemetry encryption, where identical plaintext blocks under a fixed key—common for static sensor readings—collapse ciphertext entropy and expose traffic patterns. We present a parallel multibroker MQTT framework with two encryption variants: a hybrid AES-ChaCha20 cipher (NeoCipher) and an 8D chaotic system-enhanced variant (Chaos-NeoCipher). While AES-128 and base NeoCipher exhibit leakage (entropy falling to 3.9–4.0 bits/byte), Chaos-NeoCipher mitigates it entirely (7.996 bits/byte) through chaotic key schedule advancement on each invocation. Across 100+ nodes, 10 brokers, and five attack scenarios, consensus-based detection achieves near-ceiling performance governed by protocol logic rather than cipher choice. Chaotic tuning via Lyapunov sweep ( λ ≈ 0.54 bits/iteration) and batched key-schedule optimization reduce overhead from +39.9 to +17.6%. Our results satisfy key IoT requirements: sub-millisecond cryptographic processing latency (measured as encryption/decryption time only, not including network transmission, broker queuing, or TCP overhead), near-complete detection across five attack classes under controlled simulation conditions, and mitigated single-point-of-failure vulnerability.

1. Introduction

The Internet of Things has shown exponential growth, and resource-constrained devices, such as wearable devices and smart sensors, are increasingly part of several applications. They range from smart cities and healthcare to industrial automation and environmental monitoring [1]. Nevertheless, these devices are by nature resource-constrained in terms of computational power, memory size, and battery life, which makes them particularly challenging to secure sensitive data and enforce privacy protection. With the increased proliferation of connected devices, addressing the security concerns in IoT devices is further complicated (especially in the resource-constrained setting of IoT devices). Connectivity in the IoT ecosystem relies heavily on efficient communication mechanisms through lightweight protocols specifically designed for resource-constrained devices. One protocol that has become a de facto standard is Message Queuing Telemetry Transport (MQTT), which uses a publish–subscribe model to ensure reliable message delivery with low overhead and minimal power consumption [2]. Message Queuing Telemetry Transport (MQTT) has emerged as a preferred choice due to its lightweight nature and efficiency in handling the resource constraints typically associated with Internet of Things devices. MQTT operates on a publish–subscribe model over TCP [2,3], enabling highly scalable, asynchronous communication for diverse IoT applications. However, its growing adoption has made it a target for cyber threats aimed at disrupting service availability and compromising data integrity and confidentiality [4,5]. Traditional security approaches typically integrate external protocols such as TLS or SSL [6,7], but these are often infeasible for resource-constrained IoT devices [7]. Researchers highlight that MQTT lacks a strong security scheme by default, particularly in terms of authentication and data confidentiality/integrity. TLS is commonly recommended as a security layer [7], but its feasibility depends on device capabilities, implementation efficiency, cipher suite selection (e.g., ECC-based ciphers being lighter than RSA-based ones), and the use of features like session resumption and TLS 1.3’s reduced handshake overhead [8,9]. In resource-constrained deployments—particularly those using older hardware or lacking cryptographic acceleration—TLS can impose significant overhead, motivating the exploration of alternative lightweight cryptographic approaches. MQTT security challenges include emerging vulnerabilities and attacks, with a need for classification and defense mechanisms to ensure secure IoT deployment [5]. The MQTT protocol also operates on a publish–subscribe model centered around a single broker. While lightweight and efficient, this architecture presents fundamental security challenges, including a single point of failure; broker compromise affects all connected devices [8].

1.1. Research Motivation and Identified Research Gaps

A critical weakness of MQTT is its lack of an effective native security scheme, particularly in terms of authentication, data confidentiality, and integrity. While the integration of external protocols such as Transport Layer Security (TLS) or Secure Sockets Layer (SSL) is often recommended [10], these solutions are frequently infeasible for lightweight IoT devices due to their resource demands [11]. Furthermore, the typical MQTT architecture is centralized around a single broker, introducing a fundamental single point of failure; compromise of the broker affects all connected devices [12]. This architectural vulnerability, combined with the protocol’s default security gaps, necessitates novel approaches that balance strong protection with the stringent resource limitations of IoT [13].
Beyond these two well-documented gaps, we identify a third gap specific to IoT telemetry workloads that has received little attention in the MQTT security literature: ciphertext-repetition leakage. When a block cipher is used in deterministic modes such as ECB, or in CTR/GCM modes with a fixed nonce—a scenario that arises in practice when resource-constrained IoT devices reuse nonces due to synchronization overhead, limited randomness, or implementation simplicity—identical plaintext blocks produce identical ciphertext blocks. An IoT sensor reporting an unchanged reading emits an identical plaintext block, and therefore an identical ciphertext block under these conditions. A passive network observer consequently learns when a reading has not changed, and can infer activity patterns, occupancy, and operational schedules, without ever breaking the cipher. This is not a theoretical concern for IoT: telemetry is dominated by repeated and slowly varying values, and nonce mismanagement remains prevalent in constrained deployments. We emphasize that this leakage is a property of the encryption mode and nonce handling, not of the underlying block cipher primitive. The lightweight-cryptography proposals surveyed in Section 2, refs. [13,14,15,16,17] do not address this leakage channel, and, as we show experimentally in Section 4.1, both standard AES-128 and a non-chaotic hybrid construction exhibit it severely when operating under fixed nonces.

1.2. Key Contributions

To address the challenges identified above, this paper presents a comprehensive security framework with the following contributions:
  • Identification and mitigation of ciphertext-repetition leakage in MQTT telemetry: We demonstrate experimentally that both AES-128 and a non-chaotic hybrid cipher leak repetition, with ciphertext entropy collapsing to 3.9 – 4.0 bits/byte under repeated identical plaintext, and that the proposed chaotic key schedule mitigates this leakage entirely ( 7.996 bits/byte). This is the framework’s primary, empirically verified cryptographic contribution.
  • Parallel Multi-Broker Architecture A distributed broker pool featuring automatic failover, load balancing, and consensus-based attack detection to eliminate single points of failure.
  • Coordinated Five-Mechanism Detection Layer: Simultaneous nonce-based replay detection, authentication-tag verification (spoofing and corruption), sliding-window rate limiting (DoS flood), and broker-path verification (MITM), aggregated across all brokers via a consensus mechanism, compared with at most one mechanism, and in most surveyed cases none, in prior work (Table 1).
  • NeoCipher Hybrid Encryption: The design and implementation of a hybrid cipher, NeoCipher, which combines AES-based substitution with ChaCha20 ARX operations, replacing the Galois-field MixColumns transformation with a ChaCha20-derived diffusion layer (NeoMix).
  • Tuned and optimized Chaos-NeoCipher variant: A Lyapunov-exponent sweep over the 8D system’s coupling parameter revealed that unspecified or low coupling values place the system in weak or even non-chaotic regimes; tuning to ε = 0.6 raised confirmed chaotic strength approximately twentyfold. A subsequent batched key-schedule implementation reduced the chaotic variant’s processing overhead from + 39.9 % to + 17.6 % while producing bit-identical ciphertext.
  • Reproducible evaluation: A rigorous assessment across five distinct attack scenarios with statistical validation (confidence intervals, multiple independent repetitions), alongside performance analysis. The complete cipher implementation, simulation code, and raw results are available from the corresponding author upon reasonable request.
Table 1. Attack-detection scope in related MQTT security and broker-architecture work. Works are grouped by whether they perform active attack detection. “—” indicates the work does not target a specific security focus.
The remainder of this paper is organized as follows. Section 2 provides a comprehensive review of related work, covering lightweight cryptography in MQTT, parallel and distributed broker architectures, and an attack-detection scope comparison identifying the research gaps that motivate this work. Section 3 presents the proposed system architecture, including the parallel multi-broker framework and its core components. Section 4 outlines the experimental setup and results, including testbed configuration, cryptographic security analysis, chaotic-system tuning, key-schedule optimization, attack scenarios, and detection performance. Section 5 concludes the paper and discusses future research directions.

3. The Proposed Multi-Broker MQTT Framework

Figure 1 presents the complete system architecture. The framework consists of two main pillars:
Figure 1. High-level system architecture.
A. 
Layer Cryptographic Engine (Contribution #1)
  • NeoCipher for the integrity of the ciphertext.
  • The 8D Chaotic System: Coupled logistic maps for key perturbation and entropy enhancement.
  • SHA-256 for node identity verification (spoofing detection).
B. 
A Novel Parallel Multi-Broker MQTT Management (Contribution #2)
  • Consensus-based global attack detection ( τ = 2 , W = 3 s).
  • Smart load balancer.
  • Broker path verification for MITM detection.
  • Per-node rate limiting.
  • Coordinated attack defense for parallel brokers system.
  • Fault tolerance mechanisms.

3.1. Layer Cryptographic Engine

NeoCipher are Hybrid AES (Advanced Encryption Standard) and ChaCha20, a modern, fast stream cipher with an 8-dimensional chaotic system, used as a security layer in IoT MQTT encryption. The NeoMix algorithm is the core diffusion layer of the NeoCipher block cipher it replacing AES mixing columns with ChaCha20 ARX operations. This paper presents the complete specification of NeoMix, including its algorithmic description and implementation details. NeoMix operates on 128-bit states represented as a 4 × 4 matrix of 32-bit words, applying eight quarter rounds organized as two double rounds, followed by XOR accumulation and final mixing. The algorithm achieves full diffusion within two rounds and provides resistance against differential and linear cryptanalysis in the sense of reaching complete state dependency; formal differential and linear characteristic bounds are identified as future work (Section 5). The NeoCipher combines the security strengths of AES and ChaCha20, further enhanced by an eight-dimensional chaotic system, as shown in Figure 2.
Figure 2. NeoCipher encryption architecture with chaotic key schedule (12-round configuration shown as an example; the configurable structure supports 8, 10, or 12 rounds).

3.1.1. NeoCipher

The key idea: NeoCipher uses the structure of AES but replaces one specific part (MixColumns) with operations borrowed from ChaCha20, as described in Algorithm 1. It operates on 128-bit blocks with configurable key sizes.
The experimental configuration evaluates the security and performance of the proposed NeoCipher (AES + ChaCha20 + 8D Chaotic System) in a multi-broker MQTT environment. Table 2 presents the complete experimental configuration.
Table 2. Experimental configuration parameters for a single simulation run (8 rounds, 10 brokers). Aggregated results across 30 seeds × 40 rounds.
NeoCipher integrates three cryptographic paradigms:
  • AES and ChaCha20: AES Substitution–Permutation Network (SPN) with SubBytes to provide non-linearity (AES-inspired), and ShiftRows operations provide diffusion across bytes; the ChaCha20 Core uses quarter-round and double-round functions for diffusion and provides fast bit diffusion.
  • 8D Chaotic System: Coupled map lattice for key perturbation and entropy enhancement.
  • SHA-256 for autication.
Algorithm 1 NeoCipher Encryption (R Rounds, Key Size K)
Require: 16-byte plaintext P, key K (16, 24, or 32 bytes)
Ensure: 16-byte ciphertext C
1: R ← GetRoundsFromKeySize ( len ( K ) ) ▹ R = 8 for 128-bit, 10 for 192-bit, 12 for 256-bit
2: round _ keys ← KeySchedule ( K , R ) ▹ Generates R + 1 round keys (indices 0.. R )
3: state ← P
4: state ← AddRoundKey ( state , round _ keys [ 0 ] )
5:for r ← 1 to R − 1 do▹ R − 1 rounds with NeoMix
6:   state ← SubBytes ( state )
7:   state ← ShiftRows ( state )
8:   state ← NeoMix ( state , round _ keys [ r ] )
9:end for
10: state ← SubBytes ( state ) ▹ Final round (no NeoMix)
11: state ← ShiftRows ( state )
12: state ← AddRoundKey ( state , round _ keys [ R ] ) return state
The proposed NeoCipher supports configurable rounds (8, 10, or 12), as shown in Table 3. The architectural illustration in Figure 2 depicts the 12-round configuration as a general example. However, the eight-round configuration is the one evaluated in this study (Algorithm 1 and Table 2), chosen as a balanced trade-off between security and performance for resource-constrained IoT environments.
Table 3. Configurable cryptographic parameters. The 8-round configuration is used in the experimental evaluation.

NeoMix

The operation MixColumns in the AES algorithm uses Galois Field (GF) multiplication. This is a complex mathematical multiplication that takes more CPU time and consumes more battery power; therefore, we replace this operation, MixColumns, with the ChaCha20 quarter-round ARX operation. The ChaCha20 quarter round is famously aggressive. ChaCha20 double rounds are used. After replacing MixColumns in AES, we can see the encryption and decryption process in Figure 3. Algorithm 2 achieves full diffusion within two rounds; this means that the ChaCha20 ARX operations mix the data much faster than standard AES MixColumns, allowing fewer total rounds to be used (eight rounds are used) while still maintaining strong security, as shown in Figure 4. Section 4.7 confirms this design rationale empirically: both NeoCipher variants measured substantially faster per block than the AES-128 reference implementation.
Figure 3. NeoMix dataflow: encryption and decryption.
Figure 4. NeoMix dataflow: complete processing pipeline.
The NeoMix algorithm achieves full diffusion within two rounds by leveraging the aggressive bit-mixing properties of the ChaCha20 quarter-round function. This function combines addition, rotation, and XOR (ARX) operations, which mix data significantly faster than the Galois-field multiplication used in AES MixColumns. The algorithm applies eight quarter rounds organized as two double rounds (a column round followed by a diagonal round), ensuring that after just two rounds, every output bit depends on every input bit and every key bit, achieving complete state dependency.
The resistance against differential and linear cryptanalysis is based on this same complete state dependency. Once full diffusion is achieved, differential characteristics cannot be traced through the cipher because differences are spread to all output bits. Similarly, linear approximations have poor correlations because every output bit depends on every input bit in a non-linear manner. The hybrid SPN + ARX design combines AES’s proven non-linearity (SubBytes) with ChaCha20’s fast bit diffusion, providing defense-in-depth against distinguishing attacks.
Empirical validation supports these claims. The avalanche effect is near the ideal 50 % ( 50.01 – 50.17 % with 95% CI ± 0.51), confirming complete state dependency. NIST statistical tests demonstrate that the ciphertext is indistinguishable from random, with all tests passing at α = 0.01 . However, as noted in the paper, formal differential and linear characteristic bounds are identified as future work. The current resistance claims are therefore justified by the design rationale (combining proven cryptographic primitives) and empirical validation, rather than by rigorous mathematical proofs.
Algorithm 1 presents the NeoCipher encryption pseudo-code. The detailed step-by-step implementation procedure consists of 11 phases:
1.
Phase 1—Input Preparation (Algorithm 1.1): Converts the 16-byte plaintext into a 4 × 4 state matrix.
2.
Phase 2—Key Schedule Generation (Algorithm 1.2): Generates nine round keys using an 8D chaotic system with two-layer injection (chaos BEFORE and AFTER ChaCha20), as described in Algorithm 3 of the paper.
3.
Phase 3—AddRoundKey (Algorithm 1.3): XORs the state with the round key, identical to AES’s AddRoundKey operation.
4.
Phase 4—SubBytes (Algorithm 1.4): Applies the AES S-box to each byte, providing non-linearity (confusion).
5.
Phase 5—ShiftRows (Algorithm 1.5): Cyclically shifts each row (row 0:0, row 1:1, row 2:2, row 3:3), providing byte-level diffusion.
6.
Phase 6—NeoMix (Algorithm 1.6): The core diffusion layer that replaces AES MixColumns with ChaCha20 ARX operations. It XORs the round key, creates a ChaCha20 state, applies two double rounds (eight quarter rounds), folds 16 words to 4 words, and applies final mixing.
7.
Phase 7—QuarterRound (Algorithm 1.7): The ChaCha20 quarter-round function with four ARX operations.
8.
Phase 8—Main Loop (Algorithm 1.8): Executes SubBytes → ShiftRows → NeoMix for rounds 1–7, then final SubBytes → ShiftRows → AddRoundKey for round 8.
9.
Phase 9—ChaCha20Block (Algorithm 1.9): Generates the ChaCha20 keystream block used in the key schedule.
10.
Phase 10—8D Chaotic System (Algorithm 1.10): Generates chaotic values using coupled logistic maps with ϵ = 0.6 , achieving λ ≈ 0.542 bits/iteration.
11.
Phase 11—Lyapunov-Exponent Sweep (Algorithm 1.11): The parameter tuning procedure that identified ϵ = 0.6 as the optimal value for strong chaos.
The complete implementation was validated through extensive testing, with results showing a near-ideal avalanche effect ( 50.17 % with 95% CI ± 0.51) and successful NIST statistical test passes, confirming the correctness of the implementation.
Algorithm 2 NeoMix transformation—invertible diffusion layer using ChaCha20 ARX operations
Require: s t a t e [ 16 ] (16 bytes), r o u n d _ k e y [ 16 ] (16 bytes)
Ensure: m i x e d _ s t a t e [ 16 ] (16 bytes)
Step 1: Unpack bytes to 32-bit words
1: w o r d s ← u n p a c k _ 32 ( s t a t e ) ▹ 4 words, little-endian
2: k e y _ w o r d s ← u n p a c k _ 32 ( r o u n d _ k e y )
Step 2: XOR state with round key
3:for i ← 0 to 3 do
4:   w o r d s [ i ] ← w o r d s [ i ] ⊕ k e y _ w o r d s [ i ]
5:end for
Step 3: Expand 4 words into ChaCha20 state
6: c h a c h a ← [ ]
7:for i ← 0 to 15 do
8:   c h a c h a [ i ] ← w o r d s [ i mod 4 ]
9:end for
Step 4: Apply 2 ChaCha20 double rounds
10:for r ← 1 to 2 do
11:   D o u b l e R o u n d ( c h a c h a )
12:end for
Step 5: Fold 16 words back to 4 words
13: c ← [ 0 , 0 , 0 , 0 ]
14:for i ← 0 to 3 do
15:  for j ← 0 to 3 do
16:     c [ i ] ← c [ i ] ⊕ c h a c h a [ i + 4 × j ]
17:  end for
18:end for
Step 6: Final mixing (computed into a new array)
19: d ← [ 0 , 0 , 0 , 0 ]
20: d [ 0 ] ← ( ( c [ 0 ] ⊕ c [ 1 ] ) + c [ 2 ] ) mod 2 32
21: d [ 1 ] ← ( ( c [ 1 ] ⊕ c [ 2 ] ) + c [ 3 ] ) mod 2 32
22: d [ 2 ] ← ( ( c [ 2 ] ⊕ c [ 3 ] ) + c [ 0 ] ) mod 2 32
23: d [ 3 ] ← ( ( c [ 3 ] ⊕ c [ 0 ] ) + c [ 1 ] ) mod 2 32
24:return p a c k _ 32 ( d )
The NeoMix transformation is invertible. Given the round key K r and the ChaCha20 keystream K S , decryption reverses the process:
S ( 1 ) = C ⊕ K r , S ( 2 ) = S ( 1 ) ⊕ K S , S o u t = ChaCha 20 − 1 ( S ( 2 ) )
The XOR-folding operation is invertible because the ChaCha20 permutation is bijective. Replicating 4 words to 16 words and XOR-folding back ensures complete state dependency after two double rounds while maintaining invertibility.

3.1.2. Eight-Dimensional Chaotic System

This is a novel application of an 8D hyperchaotic system specifically designed for real-time key perturbation in an MQTT broker environment, providing a significant improvement in key randomization compared to static schedules. The 8D chaotic system generates eight random numbers per round; these are XORed into the key schedule BEFORE the ChaCha20 block runs to change its input, and AGAIN AFTER it runs to add extra randomness to the round key, ensuring each round key is unpredictable and the original key cannot be recovered even if one round key is compromised. We performed a systematic Lyapunov-exponent sweep across the 8D system’s coupling parameter ϵ . We found that low values ( ϵ = 0.15 ) produced negative exponents (non-chaotic), moderate values ( ϵ = 0.25 ) produced only marginal chaos ( λ ≈ 0.027 ), and only tuning to ϵ = 0.6 achieved strong chaos ( λ ≈ 0.542 ). This is approximately a 20 × improvement and was verified across eight independent keys. This highlights why empirical tuning is essential; you cannot assume a chaotic system will behave chaotically without verification. High-dimensional systems cannot be assumed chaotic based on complexity alone. Empirical tuning via Lyapunov-exponent analysis is essential for cryptographic applications. Our sweep demonstrates that parameter selection can be the difference between strong chaos and no chaos at all. The 8D chaotic system in NeoCipher is used exclusively in the key schedule through a two-layer injection mechanism:
The key expansion (Algorithm 3) with chaos injection using the 8D chaotic system in NeoCipher is used exclusively in the key schedule through a two-layer injection mechanism. The chaotic generator injects eight chaotic values per round (Layer 1) and four values per round (Layer 2) into the key schedule. Under our experimental configuration ( ϵ = 0.6 ), the measured Shannon entropy of the resulting round keys exceeds 253 bits, indicating high variability. However, this entropy measurement does not constitute a proof of cryptographic strength; it is a preliminary statistical indicator.
The key schedule is non-invertible in the sense that the chaotic state cannot be recovered from the round keys alone, as the state evolves deterministically from the master key and nonce. This property provides defense-in-depth against key recovery if a round key is compromised, as it introduces fresh randomness in each round, as shown in Figure 5.
Figure 5. Chaos-enhanced key schedule flow.
1.
Layer 1: XOR all eight chaotic values into key words BEFORE ChaCha20.
2.
Layer 2: XOR four chaotic values into the round key AFTER ChaCha20.
Critically for the vulnerability identified in Section 1.1, the chaotic generator advances its internal state on every invocation. Two encryptions of the same plaintext under the same master key therefore consume different chaotic vectors and produce different ciphertexts—the mechanism underlying the repetition-leakage resistance measured in Section 4.1.
Algorithm 3 Two-Layer Chaos Injection in Key Schedule
Require: k e y [ 32 ]
Ensure: r o u n d _ k e y s [ 0 .. R ]
STEP 1: Initialize chaotic system
1: c h a o s ← C h a o t i c S y s t e m 8 D ( k e y ) ▹ ε = 0.6 , r = 4 , 200-step burn-in
2: k e y _ w o r d s ← P a d A n d P a r s e ( k e y ) ▹ 8 × 32-bit words
3:for r o u n d ← 0 to R do
STEP 2: Get 8 chaotic values
4:    c v [ 0 .. 7 ] ← c h a o s . n e x t V e c t o r ( )
STEP 3: LAYER 1 – Chaos BEFORE ChaCha20
5:   for  i ← 0 to 7 do
6:       k e y _ w o r d s [ i ] ← k e y _ w o r d s [ i ] ⊕ c v [ i ]
7:   end for
STEP 4: Run ChaCha20 block function
8:    b l o c k [ 0 .. 15 ] ← C h a C h a 20 B l o c k ( k e y _ w o r d s , r o u n d )
STEP 5: Fold 16 words to 4 words
9:    r k [ 0 ] ← b l o c k [ 0 ] ⊕ b l o c k [ 4 ] ⊕ b l o c k [ 8 ] ⊕ b l o c k [ 12 ]
10:    r k [ 1 ] ← b l o c k [ 1 ] ⊕ b l o c k [ 5 ] ⊕ b l o c k [ 9 ] ⊕ b l o c k [ 13 ]
11:    r k [ 2 ] ← b l o c k [ 2 ] ⊕ b l o c k [ 6 ] ⊕ b l o c k [ 10 ] ⊕ b l o c k [ 14 ]
12:    r k [ 3 ] ← b l o c k [ 3 ] ⊕ b l o c k [ 7 ] ⊕ b l o c k [ 11 ] ⊕ b l o c k [ 15 ]
STEP 6: LAYER 2 – Chaos AFTER ChaCha20
13:    r k [ 0 ] ← r k [ 0 ] ⊕ c v [ 4 ]
14:    r k [ 1 ] ← r k [ 1 ] ⊕ c v [ 5 ]
15:    r k [ 2 ] ← r k [ 2 ] ⊕ c v [ 6 ]
16:    r k [ 3 ] ← r k [ 3 ] ⊕ c v [ 7 ]
STEP 7: Store round key
17:    r o u n d _ k e y s [ r o u n d ] ← P a c k ( r k )
STEP 8: Mutate for next round
18:   for  i ← 0 to 7 do
19:       k e y _ w o r d s [ i ] ← ( k e y _ w o r d s [ i ] ⊕ b l o c k [ i ] ) mod 2 32
20:   end for
21:end for
22:return r o u n d _ k e y s
The 8D chaotic system generates eight random numbers per round; these are XORed into the key schedule BEFORE the ChaCha20 block runs to change its input, and AGAIN AFTER it runs to add extra randomness to the round key. This approach delivers an effective cryptographic foundation by ensuring high entropy exceeding 253 bits across all round keys, thereby providing defense in depth against key recovery attacks through a non-invertible key schedule. The chaotic generator advances its internal state on every invocation. Two encryptions of the same plaintext under the same master key therefore consume different chaotic vectors and produce different ciphertext. Chaos-NeoCipher retains near-ideal entropy (7.996 bits/byte) in this condition because its chaotic generator advances state on every encryption invocation.
The chaotic key schedule is deterministic given the master key and a 96-bit nonce. For each encryption operation, the chaotic system is initialized as follows:
s e e d = S H A − 256 ( m a s t e r k e y | | n o n c e )
The system generates round-specific chaotic vectors that are injected into the key schedule, as described in Algorithm 3. The nonce is transmitted in plaintext alongside the ciphertext. This design ensures that the decrypting party can reconstruct the identical chaotic state without requiring inter-broker state synchronization, as the state is derived independently from the shared key and per-message nonce. Because each message carries its own independent nonce, out-of-order delivery, retransmissions, and broker failover do not affect synchronization.

Nonce Management in Distributed Environment

Chaos-NeoCipher requires a unique 96-bit nonce per encryption. Each MQTT client maintains a monotonically increasing counter as its nonce source:
nonce = ( random _ seed ≪ 64 ) ∣ counter
where random_seed is a 32-bit unique per-device value and counter is a 64-bit monotonically increasing counter. This approach provides three essential properties: (1) uniqueness across all messages from a given sender, (2) predictability for the receiver to verify freshness, and (3) replay resistance, reinforced by the consensus-based detection layer (Section 3.2.4). The nonce is transmitted in plaintext preceding the ciphertext, as standard AEAD practice, with the authentication tag protecting against tampering. The receiver reconstructs the identical chaotic state from the shared master key and transmitted nonce. In the event of counter desynchronization, the system falls back to random nonce generation with full 96-bit entropy, providing negligible collision probability 2 − 96 . Because the chaotic state depends only on (master_key, nonce), retransmissions, out-of-order delivery, and broker failover are handled without synchronization issues, as shown in Table 4.
Table 4. Handling of retransmissions and out-of-order delivery.
No broker maintains persistent per-client nonce state, enabling horizontal scalability, fault tolerance, and load balancing.

3.1.3. Two-Layer Authentication (AEAD for Integrity and SHA-256 for Identity)

An important architectural decision in our framework is keeping SHA-256 authentication separate from NeoCipher’s encryption. This separation creates defense in depth:
1.
NeoCipher’s AEAD tag verifies ciphertext integrity (detects corruption attacks).
2.
SHA-256 authentication verifies node identity (detects spoofing attacks).
If an attacker breaks one component, the other still provides protection. Two different attacks (corruption vs. spoofing) require two different defense mechanisms.
AEAD is a cryptographic mode that simultaneously provides authentication and encryption, as shown in Table 5.
Table 5. Two-layer authentication architecture.
Each message consists of the following three components:
1.
Nonce (96 bits): A unique number used once per encryption operation to ensure that identical plaintexts encrypt to different ciphertexts. It is transmitted in plaintext alongside the ciphertext.
2.
Ciphertext (variable length): The encrypted payload produced by NeoCipher in authenticated CTR mode. Only authorized parties with the correct key can decrypt this to recover the plaintext.
3.
AEAD Tag (128 bits): A cryptographic authentication tag that provides the following:
  • Integrity verification: Ensures the ciphertext has not been altered in transit.
  • Message authentication: Verifies the message originates from a legitimate source.
  • Corruption detection: Any modification of the message results in tag mismatch.
The AEAD tag is computed using the nonce, ciphertext, and associated data (such as node ID or message metadata). Upon reception, the receiver recomputes the tag and compares it with the transmitted tag. If they match, the message is accepted; otherwise, it is rejected as corrupted or tampered.
Formally, the sender generates the SHA-256 authentication tag by hashing the concatenation of the plaintext data, the node identifier, and the nonce, then truncating to 128 bits, as specified in Algorithm 4. On reception, the receiver recomputes the expected tag from the decrypted data, the claimed sender ID, and the transmitted nonce, and compares it to the received tag, as specified in Algorithm 5. If the two tags match, the message is accepted; otherwise, the spoofing counter is incremented, and the message is rejected.
This structure ensures that the framework provides both confidentiality (via encryption) and integrity (via AEAD tag verification), forming the first layer of defense against active attacks such as message tampering and forgery, as shown in Figure 6:
Algorithm 4 SHA-256 Authentication Tag Generation (Sender)
Require: Plaintext data d a t a , Node ID n o d e _ i d , Nonce n o n c e
Ensure: Authentication tag (128 bits)
1: i n p u t ← d a t a . e n c o d e ( ) ‖ s t r ( n o d e _ i d ) . e n c o d e ( ) ‖ n o n c e
2: h a s h ← S H A − 256 ( i n p u t )
3: t a g ← h a s h [ 0 : 16 ]
4:return t a g
Algorithm 5 SHA-256 Authentication Verification (Receiver)
Require: Decrypted data d a t a , Sender ID s e n d e r , Nonce n o n c e , Received tag t a g
Ensure: Authentication success or failure
1: e x p e c t e d ← S H A − 256 ( d a t a . e n c o d e ( ) ‖ s t r ( s e n d e r ) . e n c o d e ( ) ‖ n o n c e ) [ 0 : 16 ]
2:if e x p e c t e d = t a g then
3:  return True
4:else
5:   s p o o f i n g _ d e t e c t e d ← s p o o f i n g _ d e t e c t e d + 1
6:  return False
7:end if
Figure 6. Two-layer authentication flow: AEAD tag verification followed by SHA-256 identity verification. Red dashed arrows indicate rejected messages.

3.2. Parallel Multi-Broker MQTT Management

The novel architecture consists of six core components. The components work together to provide coordinated security responses, fault tolerance, and dynamic load balancing in a distributed MQTT environment.

3.2.1. Parallel Multi-Broker Architecture:

Each broker maintains state S ∈ {ACTIVE, DEGRADED, OVERLOADED, OFFLINE,
RECOVERING}. Status transitions occur based on load factor ℓ:
ℓ = | Q pending | Q max
S = ACTIVE ℓ < 0.7 DEGRADED 0.7 ≤ ℓ < 0.9 OVERLOADED ℓ ≥ 0.9
The performance targets in Table 6 are derived from architectural reasoning:
Table 6. Comparison: single vs. parallel broker architecture.
  • Availability (≥99.99%): With N ≥ 4 brokers and heartbeat-based failure detection (≤1.5 s detection, ≤3 s recovery), the theoretical availability is 1 − ( failure _ probability ) N , which exceeds 99.99% for N ≥ 4 assuming independent failures.
  • Throughput (≥8000 msg/s): With 10 brokers × 2000 msg/s per broker (estimated from per-broker capacity) = 20,000 msg/s theoretical maximum. The 8000+ msg/s target accounts for approximately 40% inter-broker overhead based on Detti et al. [24]. These are design targets, not measured results. Experimental validation in a real deployment is identified as future work (Section 5).

3.2.2. Inter-Broker Communication Bus

Traditional MQTT deployments rely on a single broker architecture, creating a central point of failure and limiting coordinated security responses. Our proposed distributed architecture addresses these limitations through an Inter-Broker Communication Bus that connects N ≥ 4 parallel brokers. This bus serves as the backbone for three essential communication types:
A.
Heartbeat: The heartbeat messages enable the real-time health monitoring of all brokers. Every broker sends a heartbeat every 0.5 s. If a broker misses three consecutive heartbeats (1.5 s), it is considered failed.
The HEARTBEAT message is the foundation of the entire parallel multi-broker architecture. It provides the following:
  • Real-time health monitoring through frequent updates.
  • Dynamic load balancing by reporting current load metrics.
  • Failure detection by tracking missed heartbeats.
  • System visibility by making every broker’s status known to all others A.
Every 0.5 s, every broker shares five critical metrics that together paint a complete picture of its current state. This constant stream of health information enables the system to make intelligent decisions about load distribution, failure recovery, and attack response-all in real-time, without human intervention. The result is a self-healing, self-balancing, highly available MQTT cluster that can automatically detect and respond to changing conditions; see Algorithm 6.
B.
Forward: Forward messages enable dynamic load redistribution. When a broker becomes overloaded, it sends a forward message to redirect traffic to less-loaded brokers.
C.
Attack-Alert: Attack-Alert messages enable coordinated security responses. When any broker detects an attack, it broadcasts an Attack-Alert to all other brokers, triggering simultaneous defense activation.
We note that the Inter-Broker Communication Bus, load balancer, and consensus detector are themselves potential dependencies that require redundancy to avoid introducing new single points of failure. In our architecture, these components are designed as replicated services, though fault-injection validation is identified as future work.
Algorithm 6 Inter-Broker Bus Operation
Data Structures:
1: s u b s c r i b e r s ← { } ▹ broker_id → MessageQueue
2: h i s t o r y ← { } ▹ Set of processed message IDs
3:procedure Publish( m s g , s o u r c e )
4:  if  m s g . i d ∈ h i s t o r y  then
5:    return
6:  end if
7:   h i s t o r y . a d d ( m s g . i d )
8:  if  m s g . t a r g e t is specified then
9:   s u b s c r i b e r s [ m s g . t a r g e t ] . p u t ( m s g )
10:  else
11:    for each broker b in s u b s c r i b e r s with b ≠ s o u r c e  do
12:       s u b s c r i b e r s [ b ] . p u t ( m s g )
13:    end for
14:  end if
15:end procedure
16:procedure Receive( b r o k e r _ i d )
17:  return  s u b s c r i b e r s [ b r o k e r _ i d ] . g e t ( t i m e o u t = 0.001 )
18:end procedure
The Inter-Broker Communication Bus is implemented as a logically centralized but physically distributed publish–subscribe channel, with each broker running an independent bus agent connected in a fully redundant mesh topology. This design mitigates the bus as a single point of failure: if any broker fails, the remaining bus agents continue communication through alternate paths. Messages are multicast with retry mechanisms to ensure delivery even under partial network failure. The logical centralization simplifies coordination semantics, while the physical distribution ensures resilience.

3.2.3. Smart Load Balancer

The load balancer uses inverse load-factor weighting: brokers with lower load receive higher weights, making them more likely to receive new connections. The Smart Load Balancer is a critical component of the parallel multi-broker architecture. It continuously monitors broker loads through heartbeat messages, calculates dynamic weights using an inverse load factor formula, and performs weighted random selection to distribute new connections. The system is self-balancing, adaptive, and fault-tolerant.
By ensuring that no single broker becomes overloaded, the load balancer enables the entire cluster to operate efficiently and reliably.
The Smart Load Balancer is a dynamic traffic distribution system that decides which broker should receive new client connections. Unlike simple round-robin or random selection, this balancer uses real-time load information to make intelligent decisions. The core principle is simple: brokers with lower load get more connections, while brokers with higher load get fewer connections. The system continuously adapts as loads change. In essence, the Smart Load Balancer turns a collection of individual brokers into a unified, scalable, and resilient system that can handle varying workloads without manual intervention.
The Smart Load Balancer dynamically distributes client connections across brokers through four integrated mechanisms:
1.
Continuous Load Monitoring: Every 0.5 s, each broker reports its current load factor (ℓ = pending messages/maximum queue capacity) via heartbeat messages, providing real-time visibility into each broker’s state.
2.
Dynamic Weight Calculation: Using an inverse load-factor formula w = 1.0/load_factor + 0.01, brokers with lower loads receive higher weights, while heavily loaded brokers receive lower weights.
3.
Weighted Random Selection: The load balancer probabilistically selects brokers based on their calculated weights—lower-loaded brokers have higher selection probabilities, ensuring traffic is directed to the least congested brokers.
4.
Continuous Adaptation: As broker loads change over time, weights are automatically recalculated, and selection probabilities adjust accordingly, ensuring the system remains self-balancing without manual intervention.
This approach ensures no single broker becomes overloaded, the cluster operates efficiently, and the system is self-balancing, adaptive, and fault-tolerant—automatically handling broker failures and recoveries see (Algorithm 7).
The Smart Load Balancer uses an inverse load-factor weighting formula:
w = 1 ℓ + 0.01
where ℓ is the load factor. The constant 0.01 prevents division by zero and bounds the maximum weight to 100, ensuring no single broker receives excessive traffic. This feedback mechanism prevents oscillatory load redistribution, with empirical convergence observed within 3–5 heartbeat intervals.
Algorithm 7 Smart Load Balancer
1:Data: m e t r i c s = { } ▹ broker_id → load_factor
2:Data: b r o k e r s = [ ] ▹ List of available broker IDs
3:procedure Update( b r o k e r _ i d , l o a d _ f a c t o r )
4:   m e t r i c s [ b r o k e r _ i d ] ← l o a d _ f a c t o r
5:end procedure
6:procedure SelectBroker
7:   w e i g h t s ← [ ]
8:   t o t a l _ w e i g h t ← 0
9:  for each b r o k e r _ i d in b r o k e r s  do
10:     w ← 1.0 / ( m e t r i c s [ b r o k e r _ i d ] + 0.01 )
11:     w e i g h t s . append ( w )
12:     t o t a l _ w e i g h t ← t o t a l _ w e i g h t + w
13:  end for
14:   r ← random ( 0 , t o t a l _ w e i g h t )
15:   c u m u l a t i v e ← 0
16:  for  i = 0 to len ( w e i g h t s ) − 1  do
17:     c u m u l a t i v e ← c u m u l a t i v e + w e i g h t s [ i ]
18:    if  r ≤ c u m u l a t i v e  then
19:      return  b r o k e r s [ i ]
20:    end if
21:  end for
22:  return  b r o k e r s [ 0 ] ▹ Fallback
23:end procedure

3.2.4. Consensus-Based Global Attack Detection

The method detects global attacks by aggregating broker reports within a 3 s window and triggering an alert only when at least τ = 2 brokers independently report the same attack type. This consensus rule ensures reliable detection while suppressing false alarms from individual compromised or faulty brokers. Algorithm 8 presents the mechanism.
GlobalAlert = True , if | { brokers   reporting   same   attack } | ≥ τ False , otherwise
where τ = 2 and reports are only considered within a W = 3 second sliding window.
Algorithm 8 Global Attack Detection with Consensus
Require: Attack reports from brokers, Window W = 3 s, Threshold τ = 2
Ensure: Global alert if consensus reached
1: r e p o r t s ← [ ]
2:loop
3:   r ← w a i t F o r R e p o r t ( )
4:   r e p o r t s . a p p e n d ( r )
5:   r e p o r t s ← r e m o v e R e p o r t s O l d e r T h a n ( W )
6:  for each attack type A do
7:     B A ← {broker_id∣report of A from broker}
8:    if  | B A | ≥ τ and A ∉ a c t i v e T h r e a t s  then
9:       a c t i v e T h r e a t s . a d d ( A )
10:       b r o a d c a s t A l e r t ( A , B A )
11:       a c t i v a t e D e f e n s e M o d e ( )
12:    end if
13:  end for
14:end loop
Now, we analyze the consensus mechanism ( τ = 2 , W = 3  s) across six threat scenarios:
  • Compromised brokers: One malicious broker cannot trigger a global alert; detection remains 99.07 % with zero FPR.
  • Malicious false alerts: τ = 2 prevents single-source false alarms. Two colluding brokers increase FPR to 0.12 % , mitigated via a proposed reputation system (future work).
  • Correlated alarms: Evidence-based verification requires consistent attack evidence across reporting brokers, preventing false consensus.
  • Clock skew: The 3 s window accommodates ± 500  ms skew; detection remains > 99 % with NTP synchronization.
  • Network delays/partitions: Delays > 3  s reduce detection to ≈94%; mitigations include heartbeat monitoring and local logging.
  • Varying active brokers: τ = 2 remains effective for N ≥ 4 ; with N < 4 system transitions to local detection.
Table 7 reports the trade-off across τ ∈ { 1 , 2 , 3 , 4 } for N = 10 brokers. τ = 2 is optimal, it provides zero FPR, tolerates one compromised broker, maintains > 99 % detection, and achieves 1.2 s latency—the best balance among all thresholds.
Table 7. Consensus threshold ( τ ) trade-off analysis ( N = 10 brokers).
The consensus mechanism tolerates up to τ − 1 = 1 malicious broker and up to N − τ = 8 failed brokers. With NTP synchronization ( ± 500 ms), detection remains > 99 % . For N < 4 , the system transitions to local detection mode.

3.2.5. Broker Path Verification for MITM Detection

Algorithm 9 detects MITM attacks by verifying that a message arrives via the correct broker. It retrieves the expected broker ID and searches for the actual broker that has the sender in its subscriber list. If the actual broker differs from the expected broker, a spoofing attempt is detected; the algorithm increments the counter, reports the incident, and rejects the message. Otherwise, the message is accepted as legitimate. The algorithm presents the broker path verification method. MITM attacks are defined as broker-substitution scenarios where an attacker redirects traffic to an unauthorized broker or impersonates a legitimate broker. The broker-path verification mechanism detects such attacks by checking path mismatches. MITM attacks occurring transparently along the legitimate path without altering broker identity (e.g., passive eavesdropping, link-layer interception) are outside this mechanism’s scope and are addressed by the cryptographic layer (NeoCipher encryption and authentication). Each node maintains an expected broker mapping from the load balancer. When receiving a message, the node verifies the broker path.
The per-node rate limiting mechanism prevents any single node from exceeding a configurable maximum message rate. In our experimental configuration, we set this threshold to R = 50 messages per second, chosen to reflect the traffic characteristics of typical IoT sensing applications (periodic sensors, event-driven reporting) in our testbed. However, we emphasize that this threshold is application-dependent. IoT devices vary considerably in legitimate transmission frequency: industrial sensors may publish at 1–10 Hz, healthcare monitors at 10–100 Hz, multimedia sensors at higher rates, and event-driven actuators sporadically. The threshold should be configured per deployment based on expected legitimate traffic profiles. The sliding window algorithm itself is threshold-agnostic and applies to any configured R value, making it suitable for diverse IoT applications with appropriate parameter tuning.
Algorithm 9 Broker Path Verification for MITM Detection
Require: Message with sender ID, receiving node’s broker reference
Ensure: MITM detection if path mismatch
1:expected_broker ← self.broker.broker_id
2:actual_broker ← None
3:for each bid, broker in self.broker.balancer.metrics do
4:  if sender ∈ broker.subscribers then
5:    actual_broker ← bid
6:    break
7:  end if
8:end for
9:if actual_broker ≠ None ∧ actual_broker ≠ expected_broker then
10:  spoofing_detected ← spoofing_detected + 1
11:  detector.report(broker_id, “MITM ”, details)
12:  return False▹ Reject message
13:end if
14:return True

Threat Model, Detection Scope, and Limitations of Broker-Path Verification

Algorithm 9 verifies that an incoming message arrives via the broker the receiving node expects, based on the node-to-broker binding from the Smart Load Balancer (node_map[node_id]). It compares the expected broker (self.broker.broker_id, recorded at registration) with the actual broker at runtime (the broker whose subscriber list contains the sender). A mismatch increments spoofing_detected, reports MITM to the Global Attack Detector, and rejects the message.
The expected broker is recorded at node registration; the actual broker handled the packet at runtime. The two can legitimately diverge because ParallelSecureBroker.publish() forwards traffic to another broker when status == OVERLOADED and not defense_mode, emitting a FORWARD message with a new target_broker. This rerouting changes the handling broker without changing the node’s expected broker, so Algorithm 9 flags it as a path deviation. In the current implementation, legitimate overload forwarding can be misclassified as MITM unless the forward is tagged and trusted. Distinguishing legitimate FORWARD traffic from adversarial rerouting is identified as required future work.
The framework authenticates nodes (SHA-256) and payloads (NeoCipher AEAD), but not brokers or inter-broker control messages. An attacker on the inter-broker bus can redirect traffic to a rogue broker by injecting unsigned FORWARD messages, forging HEARTBEATs with load_factor ≈ 0 to maximize inverse-load weight, or overloading a legitimate broker so publish() forwards to the already top-weighted rogue broker. The attacker can impersonate a legitimate broker by registering a colliding broker ID, forging heartbeats with another broker’s source_broker, or broadcasting forged ATTACK_ALERTs to suppress consensus or force defense_mode.

3.2.6. Per-Node Rate Limiting

Algorithm 10 maintains a timestamp history for each node and applies a sliding window filter to retain only messages received within the last second. When a new message arrives, the system appends the current timestamp, removes all entries older than one second, and counts the remaining timestamps. If the count surpasses the threshold of 50, the node is immediately added to a blocklist and its message is rejected. Otherwise, the message is accepted for normal processing. This approach ensures accurate, real-time rate enforcement while avoiding the boundary burst vulnerabilities inherent in fixed-window algorithms, making it ideal for protecting distributed messaging systems from denial-of-service attacks.
Algorithm 10 Per-Node Rate Limiting with Sliding Window
Require: Node ID, current timestamp n o w , max rate R = 50 msg/s
Ensure: Block node if rate exceeded
1: t i m e s t a m p s ← node_msg_count[node_id]
2: t i m e s t a m p s . append ( n o w )
3: t i m e s t a m p s ← { t ∣ t ∈ t i m e s t a m p s ∧ t > n o w − 1     s }
4:node_msg_count[node_id] ← t i m e s t a m p s
5:if | t i m e s t a m p s | > R then
6:  blocked_nodes.add(node_id)
7:  return False▹ Skip processing
8:end if
9:return True

3.2.7. Fault Tolerance Mechanisms

The system uses heartbeat messages for failure detection with a coordinated recovery process. Each broker sends a heartbeat every 0.5 s to the Inter-Broker Bus. If a broker misses three consecutive heartbeats (1.5 s total), it is declared failed, and all other brokers are notified via Attack-Alert. The failure detection and recovery Algorithm 11 is shown below.
Algorithm 11 Failure Detection and Recovery
1:Data: m i s s e d _ h e a r t b e a t s = { } ▹ broker_id → count
2:Data: b r o k e r s = [ ] ▹ List of all brokers
3:Data: s u b s c r i b e r s = { } ▹ broker_id → list of subscribers
4:procedure CheckHeartbeats
5:  for each b r o k e r _ i d in b r o k e r s  do
6:    if no HEARTBEAT received from b r o k e r _ i d in last 1.5 s then
7:       m i s s e d _ h e a r t b e a t s [ b r o k e r _ i d ] ← m i s s e d _ h e a r t b e a t s [ b r o k e r _ i d ] + 1
8:      if  m i s s e d _ h e a r t b e a t s [ b r o k e r _ i d ] ≥ 3  then
9:        Declare  b r o k e r _ i d as OFFLINE
10:        Redistribute subscribers of b r o k e r _ i d to active brokers
11:        Update Load Balancer to exclude b r o k e r _ i d
12:        Broadcast ATTACK_ALERT to all brokers
13:        Continue operation with N − 1 brokers
14:      end if
15:    else
16:       m i s s e d _ h e a r t b e a t s [ b r o k e r _ i d ] ← 0 ▹ Reset counter
17:    end if
18:  end for
19:end procedure
20:procedure RecoverBroker( b r o k e r _ i d )
21:  Detect  b r o k e r _ i d sending new HEARTBEAT
22:  Mark  b r o k e r _ i d as ACTIVE
23:  Add  b r o k e r _ i d back to Load Balancer
24:  Redistribute subscribers to include b r o k e r _ i d
25:  Update all brokers with new state
26:end procedure

Recovery Time Objectives (RTO)

To ensure high availability, the system maintains strict recovery time objectives. Table 8 summarizes the key performance metrics for failure detection and recovery.
Table 8. Failure recovery performance metrics.

Failure Recovery Process

When a broker fails, the system executes the following steps, as shown in Table 9. The failure recovery process follows these sequential steps:
Table 9. Broker failure recovery process.
  • Detection Phase (0–1.5 s): Each broker monitors heartbeats from all other brokers. Three consecutive missed heartbeats trigger failure detection.
  • Failure Declaration: The detecting broker declares the unresponsive broker as OFFLINE and alerts the Global Attack Detector.
  • Subscriber Redistribution: All subscribers from the failed broker are automatically redistributed to the remaining active brokers using the Smart Load Balancer.
  • Load Balancer Update: The failed broker is removed from the load balancer’s active pool, and weights are recalculated.
  • Normal Operation: The system continues with N − 1 brokers, maintaining service availability.
  • Recovery Phase: When the failed broker recovers and sends a new heartbeat, it is automatically rejoined to the pool.

Subscriber Redistribution Mechanism

When a broker is declared OFFLINE, the remaining brokers use the Smart Load Balancer’s weighted selection (Algorithm 7, weight w = 1/(ℓ + 0.01)) to reassign each orphaned subscriber one at a time. After each assignment, the selected broker’s effective load is incremented so later draws see the updated weight, preventing concentration on a single broker. The failed broker is removed from the active pool, and node_map[node_id] is updated for every reassigned node so its expected broker points to the new broker. This update is essential: without it, Algorithm 9 would flag the next message as MITM (Section 3.2.5). When the broker recovers, Algorithm 11 (Section 3.2.7) (RECOVERBROKER) re-adds it to the pool; existing subscribers stay put until the next rebalance, avoiding unnecessary churn.

Resilience Metrics

To ensure high availability and minimal disruption during broker failures, the system is designed to meet the following key resilience targets. These metrics define the maximum allowable time for failure detection, client redistribution, and full system recovery, as shown in Table 10. The system successfully balances security and availability. The resilience metrics ensure this even during broker failures or active attacks.
Table 10. Fault tolerance metrics.

4. Experimental Analysis and Results

The eight-round, 10-broker system implements a comprehensive security architecture with multi-layer attack detection, including replay detection, rate limiting (50 msg/s), MAC verification, integrity checks, and behavioral anomaly detection. The system features adaptive defense mechanisms that increase drop rates during global threats, consensus-based global detection across brokers, and weighted load balancing for optimal performance. With NeoCipher encryption (AES + ChaCha20 hybrid with 8D chaos) and parallel processing (10 worker threads per broker), the architecture demonstrates production-ready security capabilities. The system maintains broker health through active monitoring and automatic degradation handling.

4.1. Simulation Environment and Phases

The Chaos-Enhanced Parallel Multi-Broker MQTT Simulation is a comprehensive IoT security testing framework that implements the following:
  • 10 Parallel Brokers with load balancing and fault tolerance.
  • Chaos-Enhanced NeoCipher: Hybrid AES + ChaCha20 + 8D Chaotic System.
  • 100 IoT Nodes with secure MQTT communication.
  • Five Attacker Nodes executing six attack types.
  • Global Attack Detection using consensus mechanism ( τ = 2 , W = 3 s).
The 10-round configuration in Table 2 represents the base simulation loop for a single experimental run, while the 30 seeds × 40 rounds represent the aggregated validation across multiple independent runs. Specifically:
The rate limit of R = 50 msg/s was selected based on the traffic characteristics of our simulated IoT environment, which included periodic sensors (40%), event-driven sensors (30%), high-rate sensors (20%), and actuators (10%). This threshold is specific to our experimental configuration and is not intended as a universal recommendation. In production deployments, the threshold should be tuned according to the expected legitimate traffic of each device type.

4.1.1. Phase 1: Environment Setup

  • Import required libraries (hashlib, random, threading, queue, matplotlib).
  • Define AttackType Enum (eight attack types).
  • Define BrokerStatus Enum (five status states).
  • Create data classes (PacketMetrics, BrokerMetrics, AttackConfig).
  • ConFigure matplotlib for 1024 × 720 pixel output.

4.1.2. Phase 2: Encryption Implementation

  • Implement GF256 for Galois Field operations.
  • Generate AES S-box and inverse S-box.
  • Implement ChaCha20 ARX operations.
  • Create 8D Chaotic System with coupled maps.
  • Implement NeoMix (replaces AES MixColumns).
  • Create Chaos-Enhanced Key Schedule.
  • Implement NeoCipher block cipher.
  • Implement CTR mode with authentication.
Crucially for experimental validity, the chaotic injection is implemented as a single switchable parameter, so that NeoCipher and Chaos-NeoCipher differ in exactly one variable. This isolates the chaotic contribution and makes the comparison in Section 4.2, Section 4.3, Section 4.4, Section 4.5, Section 4.6 and Section 4.7 a controlled ablation of a comparison between two independently built systems.

4.1.3. Phase 3: Communication Infrastructure

  • InterBrokerBus: Message passing between brokers.
    -
    Heartbeat messages (every 0.5 s).
    -
    Attack alerts (global broadcast).
    -
    Message forwarding (load redistribution).
  • SmartLoadBalancer: Weighted distribution.
  • GlobalAttackDetector.

4.1.4. Phase 4: Broker Pool Creation

The parallel broker pool is initialized with 10 brokers, each configured with a message queue (5000 messages), 10 worker threads, and security modules, including encryption, authentication, and defense mechanisms. Listing 1 shows the broker initialization code.
Listing 1. Broker Initialization.
class ParallelSecureBroker:
  def  __init__(self, broker_id, bus, balancer, detector):
    self.msg_queue = queue.Queue(maxsize = 5000)
    self.executor = ThreadPoolExecutor(max_workers = 10)
    self.defense_mode = True    
    self.drop_rate = 0.05
    self.max_rate = 50  # messages per second
    self.node_msg_count = defaultdict(list)
  def start(self):
    Thread(target=self._heartbeat, daemon=True).start()
    Thread(target=self._processor, daemon=True).start()
    Thread(target=self._listener, daemon=True).start()

4.1.5. Phase 5: Node Creation

Table 11 presents the distribution of nodes in the simulation environment, comprising 100 legitimate IoT devices and five attacker nodes executing malicious operations.
Table 11. Node types and counts.

4.1.6. Phase 6: Simulation Loop

The simulation executes ten rounds, where each round processes legitimate messages from all 100 nodes and attack messages from the five attacker nodes based on the configured attack intensity (20–25%). Listing 2 presents the main simulation loop implementation.
Listing 2. Main Simulation Loop.
for  round_num in range(10):  # 10 rounds
     # All 100 nodes publish normal messages
     with ThreadPoolExecutor(max_workers = 8) as ex:
         futures = [ex.submit(n.publish) for n in nodes]
         for f in as_completed(futures):
             all_metrics.append(f.result())
     # Attackers conduct attacks
     for atk in attackers:
         if random.random() < intensity:
             attack_metrics.append(atk.conduct_attack())
     # Progress reporting
     if (round_num + 1) % 3 == 0:
         print(f"Round␣{round_num + 1}:␣{stats[’total_msgs’]}␣msgs")

4.1.7. Phase 7: Message Processing

1.
Rate limiting (50 msg/s per node).
2.
Queue processing (10 worker threads).
3.
Load monitoring (ACTIVE/DEGRADED/OVERLOADED).
4.
Attack detection (five mechanisms).
5.
Defense mode activation.

4.2. Ciphertext-Repetition Leakage (Primary Cryptographic Result)

The repetition-leakage experiment was conducted as a controlled comparison where all three ciphers-AES-128, base NeoCipher, and Chaos-NeoCipher-operated under identical conditions with fixed key, nonce, and counter parameters. This methodology isolates the chaotic key perturbation as the sole variable, thereby demonstrating the structural vulnerability of deterministic encryption when operating under fixed parameters. We acknowledge that proper nonce management with unique nonces per encryption would produce different ciphertexts for repeated plaintext in any CTR-mode cipher. However, our contribution addresses the practical constraints of resource-constrained IoT deployments, where many devices lack the capability for proper nonce management due to synchronization overhead, limited randomness sources, and implementation complexity.
The chaotic key schedule offers a practical and self-contained solution by eliminating repetition leakage even when nonces remain fixed, without imposing additional nonce management overhead. This represents a key contribution of our work, providing an effective mitigation for a practical IoT vulnerability that existing lightweight cryptography proposals have not addressed.
This experiment tests the vulnerability identified in Section 1.1, which is specific to IoT telemetry workloads and is not captured by conventional cryptographic evaluation on high-entropy inputs. A single fixed key encrypts 3000 consecutive plaintext blocks under four input conditions, and the Shannon entropy of the resulting ciphertext stream is measured. Shannon entropy is computed over the byte distribution of the full ciphertext stream; the theoretical maximum is 8.000 bits/byte, as shown in the Table 12.
Table 12. Ciphertext entropy (bits/byte) under four input conditions; ideal = 8.000.
Formally, H = − ∑ b p ( b ) log 2 p ( b ) over byte values b ∈ { 0 , … , 255 } , where p ( b ) is the empirical frequency of byte b in the concatenated 3000-block ciphertext stream; the maximum is log 2 ( 256 ) = 8.000 bits/byte.
Under non-repeating input, all three ciphers are statistically indistinguishable and near-ideal, the expected result, and a useful correctness check on the implementation. Under repeated identical plaintext, however, AES-128 and base NeoCipher lose more than half of their ciphertext entropy. The mechanism is structural rather than a weakness of either cipher’s round function: identical input under an identical key deterministically produces identical output, so a stream of repeated blocks yields a stream of repeated ciphertext blocks, and the byte distribution collapses onto a small support set. Chaos-NeoCipher retains near-ideal entropy (7.996 bits/byte) in this condition because its chaotic generator advances state on every encryption invocation (Section 3.1.2), so the same plaintext under the same master key produces different ciphertext on each call. The practical consequence for MQTT telemetry is direct: a passive observer of an encrypted MQTT stream can distinguish “reading unchanged” from “reading changed” under AES-128 or base NeoCipher, inferring occupancy, activity schedules, and operational state without breaking the cipher, and cannot do so under Chaos-NeoCipher. This constitutes the framework’s clearest and most practically relevant cryptographic contribution for IoT deployment.
To complement the entropy analysis, we measured ciphertext block repetition frequency under repeated identical plaintext. AES-128 and base NeoCipher exhibit repetition rates of 0.998 and 0.997 , respectively-meaning a passive observer would see nearly identical ciphertext blocks for every unchanged sensor reading. In contrast, Chaos-NeoCipher exhibits a repetition rate of 0.0003 , effectively indistinguishable from random. (5) Under AES-128 in CTR mode with fixed key, nonce, and counter, the keystream is identical for every message, so identical plaintext blocks produce byte-identical ciphertext blocks. A passive observer can partition the ciphertext into 16-byte blocks and test for equality without holding the key. A run of repeated blocks reveals an unchanged reading; a new block reveals a change; a return to a prior block reveals a return to a prior state. The measured entropy of 4.000 bits/byte and repetition rate of 0.998 under repeated identical plaintext quantify the leak. Under Chaos-NeoCipher, the repetition rate falls to 0.0003 , and the observer sees no such pattern. This direct repetition metric confirms the practical leakage mechanism: an observer can trivially distinguish “reading unchanged” from “reading changed” under deterministic ciphers, while Chaos-NeoCipher provides no such observable pattern.

4.3. Avalanche Effect

The avalanche effect measures the sensitivity of an encryption algorithm to input changes. A good cipher should produce a significant change in ciphertext when a single bit of plaintext or key is modified. The ideal avalanche effect is 50%, where half of the output bits change. Table 13 reports single-bit-flip avalanche across 300 independent trials per cipher, each using a freshly generated random key and plaintext, with a randomly selected bit position. Confidence intervals are reported at the 95% level.
Table 13. Avalanche effect, single-bit plaintext flip, n = 300 trials per cipher; ideal = 50%.
All three ciphers converge to the ideal 50% within overlapping confidence intervals, and the differences between them are not statistically significant. This is the expected outcome once full diffusion is achieved and is reported here as a correctness check rather than as evidence of a chaos-driven improvement: since 50% is itself the target, deviating further from it in either direction would not constitute better performance. We note this explicitly because avalanche differences of one to two percentage points are sometimes reported in the literature as cipher improvements without accompanying confidence intervals; at n = 300, the confidence interval half-width here is approximately 0.5 percentage points, so differences below roughly one point cannot be distinguished from sampling noise.

4.4. Statistical Randomness

The cryptographic strength of the ciphertext streams was evaluated using the complete NIST SP 800-22 statistical test suite. Table 14 testing was conducted across the following:
Table 14. NIST SP 800-22 aggregate results.
  • 10 independent keys (randomly generated).
  • 100 sequences per key ( 1 × 10 6 bits each, generated in CTR mode).
  • Total: 1000 sequences × 15 tests = 15,000 test instances.
Table 15, both variants meet the NIST acceptance criteria (proportion > 0.96 ) for the full 15-test battery, with Chaos-NeoCipher achieving a higher pass rate and more uniform p-value distribution. The p-value uniformity analysis ( χ 2 test across 10 intervals) confirms that the p-values are uniformly distributed, indicating no systematic bias in the randomness assessment.
Table 15. NIST SP 800-22 detailed results by test type.

4.5. Key-Schedule Optimization

Execution profiling of the chaotic variant identified chaotic-vector generation in the key schedule as the dominant source of its processing overhead, accounting for approximately 17% of total encryption time. A batched generator was therefore implemented, producing 64 steps of chaotic state per invocation and serving individual vectors from an internal buffer, with the ring-coupling indices unrolled (eliminating modulo operations at each step) and loop constants hoisted to local scope. The mathematical map, coupling topology, coupling strength ϵ , clamping behavior, and burn-in procedure are unchanged by this optimization; it is a pure implementation-level speedup with no algorithmic or security implications. Equivalence was verified in two ways: the optimized generator was confirmed to produce bit-identical output to the reference generator across 500 consecutive chaotic vectors, and the resulting cipher was confirmed to produce bit-identical ciphertext on full-block encryption, as shown in Table 16.
Table 16. Per-block encryption latency (mean ± std dev).

4.6. AES-128 Performance Comparison

Implementation Details (now specified in the revised manuscript):
  • AES-128 Reference: Pure Python implementation following the NIST FIPS 197 specification, without AES-NI hardware acceleration. Key scheduling is included in the timing measurement (precomputed once per encryption operation). Execution environment: Python 3.10, Intel Core i7-1185G7 @ 3.0 GHz, Ubuntu 22.04 LTS.
  • NeoCipher Variants: Same Python environment, same software stack, same timing methodology. Chaotic injection is the sole variable between base and optimized variants.
  • Timing Protocol: Mean of five independent repetitions × 400 encryptions each, including key scheduling, with a warm-up period of 100 iterations before measurement.
Both NeoCipher variants measure substantially faster per block than the AES-128 reference in this Python implementation, validating the design rationale for replacing Galois-field MixColumns with ChaCha20 ARX operations under identical software and hardware conditions.
We emphasize that these latency values are implementation-specific and measured under the conditions described above. Performance in production deployments would depend on language-level optimizations, use of hardware acceleration, and network/queuing latencies not captured in this cryptographic-layer timing comparison.
The optimization reduces the chaotic variant’s overhead by more than half—a 16.0% speedup of the chaotic path—while producing identical ciphertext. Two observations follow. First, the cost of repetition-leakage resistance (Section 4.2) is a per-block overhead of under 18% relative to the non-chaotic hybrid, which is a modest price for eliminating a leakage channel that both AES-128 and base NeoCipher exhibit. Second, both NeoCipher variants measure substantially faster per block than the AES-128 reference in this implementation, consistent with the design rationale for replacing MixColumns’ Galois-field multiplication with ChaCha20 ARX operations (Section 3.1.1).

4.7. Attack-Detection Performance

Table 17 the detection mechanisms specified in Algorithms 8–10 were executed as described: nonce tracking for replay detection, SHA-256 authentication-tag verification for spoofing and corruption, sliding-window rate limiting for DoS flood, and broker-path verification for MITM, all aggregated under consensus ( τ = 2, W = 3 s). The configuration follows Table 2: 100 nodes, five attacker nodes, 10 brokers, 10 rounds, attack intensity 20–25%, approximately 2500 packets per scenario.
Table 17. Detection performance by attack type, pooled over 30 independent random seeds × 40 rounds per seed (aggregated experimental configuration).

4.7.1. Attack Generation and Traffic Modeling

(6-E2) To enable meaningful interpretation of the detection performance reported, we provide detailed specifications of the attack generation process and normal traffic modeling.

Normal Traffic Distribution

The 100 legitimate IoT nodes were configured with heterogeneous traffic profiles:
  • 40 nodes (40%): Periodic sensors publishing readings every 5–60 s (uniformly distributed intervals).
  • 30 nodes (30%): Event-driven sensors publishing only when simulated sensor values change by more than 5%.
  • 20 nodes (20%): High-rate sensors publishing at 1–10 msg/s with occasional bursts of up to 80 msg/s for 2–5 s.
  • 10 nodes (10%): Actuator nodes with sporadic traffic (0–10 msg/s, Poisson-distributed).
Legitimate burst traffic was modeled by injecting 200–500 additional messages over 2–5 s periods in 5% of node operation cycles to test the 50 msg/s rate limit threshold, as shown in Table 18.
Table 18. Attack generation parameters.

Attack Generation

Attack intensity (20–25%) is the proportion of attacker messages relative to legitimate traffic.

Adaptive Attacker Scenarios

To test detection robustness, three attacker awareness scenarios were evaluated:
  • Scenario A (Naive): Fixed high-rate patterns without threshold awareness.
  • Scenario B (Informed): Rates adjusted just below thresholds (e.g., 49 msg/s).
  • Scenario C (Adaptive): Varying patterns to avoid detection.

False Positive Measurement

False positives were measured by the following:
1.
Running simulations with legitimate traffic only (no attacks) across 10 rounds.
2.
Counting any detection alerts triggered by normal traffic.
3.
Measuring legitimate high-rate bursts against the 50 msg/s threshold.
4.
Verifying no nonce rejection, path verification failures, or authentication mismatches.

Consensus Threshold Rationale

Threshold τ = 2 balances detection reliability against false alarm risk. With 10 brokers, requiring two independent reports provides:
  • A total of 99.9% confidence that an attack is genuine (assuming 0.1% per-broker FPR).
  • Resilience against a single compromised or faulty broker.
  • Rapid detection without waiting for majority consensus ( τ = 6 ).
Window W = 3 s aligns with the 0.5 s heartbeat interval (six heartbeats), ensuring timely detection. Sensitivity analysis across τ = 1 , 2 , 3 , 4 and W = 1 , 3 , 5 , 10 s.
Table 19 presents the aggregate performance comparison between the two cipher variants. Both NeoCipher (base) and Chaos-NeoCipher achieve identical average detection rates ( 99.07 % ) and false positive rates ( 0.00 % ), confirming that the consensus-based detection layer is governed by protocol logic rather than cipher choice. The cryptographic processing latency differs slightly, with Chaos-NeoCipher incurring a 0.05 ms overhead ( 0.501 ms vs. 0.551 ms), which is attributable to the additional chaotic key schedule operations. This overhead is modest (≈10%) and acceptable given the elimination of ciphertext-repetition leakage provided by the chaotic enhancement. These findings support the claim that the framework maintains near-ceiling detection performance while the chaotic variant adds minimal latency overhead.
Table 19. Aggregate performance by cipher variant.
Detection performance is near-ceiling and identical for both cipher variants across every attack type. The substantive finding is structural: attack detection in this architecture is governed by the protocol layer—nonce state, tag verification, rate accounting, and path checking—and not by the choice of cipher. This is the expected result on reflection, since a sound 128-bit authentication tag rejects forgeries with overwhelming probability regardless of which sound cipher generates it, and nonce, rate, and path checks operate entirely above the cipher. Latency values in Table 20 reflect cryptographic processing time only, measured under the conditions of Section 4.6; they do not include network transit, broker queuing under real load, or TCP behavior, and must not be read as end-to-end deployment Figures. Measurement on a live broker deployment is identified as required future work.
Table 20. Detection performance by attack type (30 seeds × 40 rounds per cell; pooled across seeds).

4.8. Summary of Results

Table 21 consolidates the principal findings from the experimental evaluation, organized into eight key categories that span cryptographic security, attack detection, chaotic system performance, and computational efficiency. The repetition-leakage resistance result represents the framework’s primary cryptographic contribution: Chaos-NeoCipher retains near-ideal ciphertext entropy (7.996 bits/byte) under repeated identical plaintext, compared to AES-128 and base NeoCipher, which collapse to 3.875–4.000 bits/byte. This mitigates a passive leakage channel present in standard deterministic ciphers. The detection breadth and rate findings demonstrate the multi-broker architecture’s effectiveness: five attack classes are coordinated and detected with 98.2–100% accuracy and zero false positives, versus at most one class in prior work. The detection performance is governed by protocol-layer logic rather than cipher choice. The chaotic system results confirm that empirical tuning via Lyapunov-exponent sweep is essential for achieving strong chaos ( λ ≈ 0.542 bits/iteration, a ≈ 20 × improvement), with strictly positive exponents across all eight independent keys.
Table 21. Summary of principal findings.
Finally, the optimization results show the chaotic enhancement’s cost is modest: batched key-schedule generation reduced overhead from +39.9% to +17.6% while producing bit-identical output, and both NeoCipher variants outperform AES-128, validating the ARX-for-GF-multiplication design rationale.

5. Conclusions

This paper addressed critical security limitations in MQTT-based IoT communications by introducing a parallel multi-broker framework with two encryption variants-NeoCipher (AES-ChaCha20) and its chaos-enhanced variant, Chaos-NeoCipher-alongside a coordinated, consensus-based attack-detection layer covering five concurrent attack classes. The experimental evaluation across 100 nodes, 10 brokers, and five attack scenarios establishes four principal findings:
First, ciphertext-repetition leakage is a measurable vulnerability in IoT telemetry. AES-128 and base NeoCipher lose more than half their entropy under repeated plaintext (falling to 3.875–4.000 bits/byte), while Chaos-NeoCipher retains 7.996 bits/byte, eliminating passive traffic pattern inference.
Second, the multi-broker architecture achieves near-complete detection (98.2–100%) with zero false positives, governed by protocol-layer logic rather than cipher choice—a finding that held both before and after chaotic tuning.
Third, the 8D chaotic subsystem required empirical Lyapunov tuning; a sweep revealed that plausible coupling values can yield non-chaotic dynamics ( λ < 0 at ϵ = 0.15 ), while tuning to ϵ = 0.6 raised chaotic strength approximately twentyfold to λ ≈ 0.542 bits/iteration.
Fourth, batched key-schedule optimization reduced chaotic overhead from + 39.9 % to + 17.6 % while producing bit-identical output, and both NeoCipher variants outperformed AES-128, validating the ARX-for-GF-multiplication design rationale.
The chaotic enhancement’s value is specific to the repetition scenario, not a blanket improvement in diffusion or detection rate. Similarly, attack-detection performance is governed by protocol logic, not cipher choice.
All latency figures reported in this work represent cryptographic processing time only—the CPU time required for block cipher operations at the cryptographic layer. These measurements were obtained in a controlled Python environment without network transmission, broker queuing, thread scheduling, I/O operations, hardware acceleration, or other system components that constitute end-to-end MQTT latency.
Future work extends this study in five directions: (1) deployment on physical IoT hardware (Raspberry Pi, ESP32) for end-to-end latency and energy measurement; (2) complete 15-test NIST SP 800-22 evaluation across multiple keys; (3) analytical differential/linear cryptanalysis of NeoMix; (4) larger-scale evaluation with 100+ brokers; and (5) real-world false-positive validation under non-stationary traffic. Fault-injection experiments involving broker failures, recovery, network partitions, and load redistribution are identified as required future work to validate the architectural claims experimentally.

Author Contributions

Conceptualization: H.S.M., M.E.R., and H.K.H.; Methodology: H.S.M., M.E.R., and H.K.H.; Software: H.S.M.;Validation: H.S.M., M.E.R., and H.K.H.; Formal Analysis: H.S.M., M.E.R., and H.K.H.; Investigation: H.S.M., M.E.R., and H.K.H.; Resources: H.S.M., M.E.R., and H.K.H.; Data Curation: H.S.M., M.E.R., and H.K.H.; Writing—Original Draft Preparation: H.S.M., M.E.R., and H.K.H.; Writing—Review & Editing: H.S.M., M.E.R., and H.K.H.; Visualization: H.S.M., M.E.R., and H.K.H.; Supervision: M.E.R. and H.K.H.; Project Administration: H.S.M., M.E.R., and H.K.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data presented in this study are available on request from the corresponding author. The data are not publicly available due to the ongoing project.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
AEADAuthenticated Encryption with Associated Data
AESAdvanced Encryption Standard
AMAuthentication Manager
APCArticle Processing Charge
ARXAddition, Rotation, XOR
CPUCentral Processing Unit
CSPCommunicating Sequential Processes
CTRCounter Mode (encryption)
CVECommon Vulnerabilities and Exposures
DoSDenial of Service
DRDoSDistributed Reflective Denial of Service
ECDHE      Elliptic Curve Diffie-Hellman Ephemeral
ECDSAElliptic Curve Digital Signature Algorithm
FPRFalse Positive Rate
GFGalois Field
GCMGalois/Counter Mode
GPSGlobal Positioning System
IoTInternet of Things
IoMTInternet of Medical Things
KSAKey Schedule Algorithm
MACMessage Authentication Code
MITMMan-in-the-Middle
MQTTMessage Queuing Telemetry Transport
MQTT-SNMQTT for Sensor Networks
NeoCipherBase hybrid encryption algorithm (AES + ChaCha20)
NeoMixAlgorithm replacing AES MixColumns with ChaCha20 ARX operations
NVDNational Vulnerability Database
PDRPacket Delivery Ratio
PFSPerfect Forward Secrecy
PSKPre-Shared Key
QoRQuality of Effectiveness
QoSQuality of Service
RSARivest–Shamir–Adleman (cryptosystem)
RTORecovery Time Objective
S-BoxSubstitution Box
SHASecure Hash Algorithm
SPNSubstitution–Permutation Network
SSLSecure Sockets Layer
TCPTransmission Control Protocol
TLSTransport Layer Security
XORExclusive OR
τ (Tau)Consensus threshold for global attack detection (set to 2)
ℓ (El)Load factor of a broker, calculated as ℓ = | Q pending | / Q max

References

  1. Hudda, S.; Haribabu, K. A review on WSN based resource constrained smart IoT systems. Discov. Internet Things 2025, 5, 56. [Google Scholar] [CrossRef] [Scilit]
  2. Ristian, U.; Ruslianto, I.; Hasfani, H.; Sari, K. Perancangan Arsitektur Node Nirkabel dalam Efisiensi Bandwidth Smart Greenhouse Berbasis Protokol MQTT. JEPIN 2023, 9, 218–225. [Google Scholar] [CrossRef] [Scilit]
  3. Chen, F.; Huo, Y.; Zhu, J.; Fan, D. A review on the study on MQTT security challenge. In 2020 IEEE International Conference on Smart Cloud (SmartCloud); IEEE: New York, NY, USA, 2020; pp. 128–133. [Google Scholar] [CrossRef] [Scilit]
  4. Laghari, S.U.A.; Li, W.; Manickam, S.; Nanda, P.; Al-Ani, A.K.; Karuppayah, S. Securing MQTT ecosystem: Exploring vulnerabilities, mitigations, and future trajectories. IEEE Access 2024, 12, 139273–139289. [Google Scholar] [CrossRef] [Scilit]
  5. Mishra, B.; Mishra, B.; Kertesz, A. Stress-testing MQTT brokers: A comparative analysis of performance measurements. Energies 2021, 14, 5817. [Google Scholar] [CrossRef] [Scilit]
  6. Paris, I.L.B.M.; Habaebi, M.H.; Zyoud, A.M. Implementation of SSL/TLS security with MQTT protocol in IoT environment. Wirel. Pers. Commun. 2023, 132, 163–182. [Google Scholar] [CrossRef] [Scilit]
  7. Sanjuan, E.B.; Cardiel, I.A.; Cerrada, J.A.; Cerrada, C. Message queuing telemetry transport (MQTT) security: A cryptographic smart card approach. IEEE Access 2020, 8, 115051–115062. [Google Scholar] [CrossRef] [Scilit]
  8. Liu, Y.; Al-Masri, E. Slow Subscribers: A novel IoT-MQTT based denial of service attack. Clust. Comput. 2023, 26, 3973–3984. [Google Scholar] [CrossRef] [Scilit]
  9. Patel, C.; Doshi, N. A novel MQTT security framework in generic IoT model. Procedia Comput. Sci. 2020, 171, 1399–1408. [Google Scholar] [CrossRef] [Scilit]
  10. Alassaf, N.; Gutub, A.; Parah, S.A.; Al Ghamdi, M. Enhancing speed of SIMON: A lightweight-cryptographic algorithm for IoT applications. Multimed. Tools Appl. 2019, 78, 32633–32657. [Google Scholar] [CrossRef] [Scilit]
  11. Sochor, H.; Ferrarotti, F.; Ramler, R. Exploiting MQTT-SN for distributed reflection denial-of-service attacks. In DEXA 2020; Springer: Berlin/Heidelberg, Germany, 2020; pp. 74–81. [Google Scholar] [CrossRef] [Scilit]
  12. Pelz, K. Robustness of Publish/Subscribe Systems: A Survey: Introducing the Quality of Robustness and Applying It to Current Works in the Publish/Subscribe Context; Technical Report; Department of Telecommunication Systems, Technische Universität Berlin: Berlin, Germany, 2020. [Google Scholar]
  13. Kao, T.L.; Wang, H.C.; Li, J.E. Safe MQTT-SN: A lightweight secure encrypted communication in IoT. J. Phys. Conf. Ser. 2021, 2020, 012044. [Google Scholar] [CrossRef] [Scilit]
  14. Iyer, S.; Bansod, G.V.; Naidu, P.; Garg, S. Implementation and evaluation of lightweight ciphers in MQTT environment. In 2018 ICEECCOT; IEEE: New York, NY, USA, 2018; pp. 276–281. [Google Scholar] [CrossRef] [Scilit]
  15. Alharbi, S.; Bell, D.; Awad, W. Lightweight Security Scheme for Internet of Things Encryption. Appl. Math. Inf. Sci. 2025, 19, 751–760. [Google Scholar] [CrossRef] [Scilit]
  16. Imdad, M.; Ramli, S.N.; Mahdin, H. An enhanced key schedule algorithm of PRESENT-128 block cipher for random and non-random secret keys. Symmetry 2022, 14, 604. [Google Scholar] [CrossRef] [Scilit]
  17. Sabri, O.; Al-Shargabi, B.; Abuarqoub, A.; Hakami, T.A. A Lightweight Encryption Method for IoT-Based Healthcare Applications: A Review and Future Prospects. IoT 2025, 6, 23. [Google Scholar] [CrossRef] [Scilit]
  18. Munshi, A. Improved MQTT secure transmission flags in smart homes. Sensors 2022, 22, 2174. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  19. Zhu, X.; Feng, X.; Chen, Y. Design of MQTT trusted communication solution based on TrustZone. Integr. Circuits Embed. Syst. 2024, 24, 36–41. [Google Scholar] [CrossRef]
  20. Lin, W.; Chen, S.; Zhu, H. Formalization and verification of MQTT-SN communication using CSP. In ECBS 2023; Springer: Berlin/Heidelberg, Germany, 2023; pp. 115–132. [Google Scholar] [CrossRef] [Scilit]
  21. Banno, R.; Sun, J.; Fujita, M.; Takeuchi, S.; Shudo, K. Dissemination of edge-heavy data on heterogeneous MQTT brokers. In 2017 IEEE CloudNet; IEEE: New York, NY, USA, 2017; pp. 1–7. [Google Scholar] [CrossRef] [Scilit]
  22. Longo, E.; Redondi, A.E.; Cesana, M.; Arcia-Moret, A.; Manzoni, P. MQTT-ST: A spanning tree protocol for distributed MQTT brokers. In ICC 2020; IEEE: New York, NY, USA, 2020; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
  23. Kurdi, H.; Thayananthan, V. A multi-tier MQTT architecture with multiple brokers based on fog computing for securing industrial IoT. Appl. Sci. 2022, 12, 7173. [Google Scholar] [CrossRef] [Scilit]
  24. Detti, A.; Funari, L.; Blefari-Melazzi, N. Sub-linear scalability of MQTT clusters in topic-based publish-subscribe applications. IEEE Trans. Netw. Serv. Manag. 2020, 17, 1954–1968. [Google Scholar] [CrossRef] [Scilit]
  25. Kim, H.J.; Lee, M.H. A Comparative Performance Study of Parallel MQTT and RS485 Communication Architectures for High-Frequency IoT Sensing. Electronics 2026, 15, 760. [Google Scholar] [CrossRef] [Scilit]
  26. Amoretti, M.; Pecori, R.; Protskaya, Y.; Veltri, L.; Zanichelli, F. A scalable and secure publish/subscribe-based framework for industrial IoT. IEEE Trans. Ind. Inform. 2020, 17, 3815–3825. [Google Scholar] [CrossRef] [Scilit]
  27. Amanlou, S.; Hasan, M.K.; Bakar, K.A.A. Lightweight and secure authentication scheme for IoT network based on publish-subscribe fog computing model. Comput. Netw. 2021, 199, 108465. [Google Scholar] [CrossRef] [Scilit]
  28. Spohn, M.A. An Endogenous and Self-organizing Approach for the Federation of Autonomous MQTT Brokers. In ICEIS 2021; SciTePress: Setúbal, Portugal, 2021; Volume 1, pp. 834–841. [Google Scholar] [CrossRef] [Scilit]
  29. Alharbi, S.; Bell, D.; Awad, W. HECS4MQTT: Health Edge Cloud Security for MQTT Framework. Future Internet 2025, 17, 298. [Google Scholar] [CrossRef] [Scilit]
  30. Sahmi, I.; Abdellaoui, A.; Mazri, T.; Hmina, N. MQTT-PRESENT: Approach to secure internet of things applications using MQTT protocol. Int. J. Electr. Comput. Eng. 2021, 11, 4293–4301. [Google Scholar] [CrossRef] [Scilit]
  31. Lustro, R.A.; Sison, A.M.; Medina, R.P. Performance analysis of enhanced SPECK algorithm. In Proceedings of the 4th International Conference on Industrial and Business Engineering; ACM: New York, NY, USA, 2018; pp. 256–264. [Google Scholar] [CrossRef] [Scilit]
  32. Husnain, M.; Hayat, K.; Cambiaso, E.; Fayyaz, U.U.; Mongelli, M.; Akram, H.; Ghazanfar Abbas, S.; Shah, G.A. Preventing MQTT vulnerabilities using IoT-enabled intrusion detection system. Sensors 2022, 22, 567. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  33. Zeghida, H.; Boulaiche, M.; Chikh, R. Security of MQTT Protocol: A Brief Overview. CEUR-WS.org. 2024. Available online: https://ceur-ws.org/Vol-3973 (accessed on 14 September 2026).
  34. Liu, Z.C.; Liang, T.; Sun, R.C.; Hao, Z.Q.; Li, J. Research and implementation of MQTT security mechanism based on SM cryptographic algorithms. Comput. Sci. 2024, 51, 333–342. [Google Scholar] [CrossRef]
  35. Stevens, M.; Bursztein, E.; Karpman, P.; Albertini, A.; Markov, Y. The first collision for full SHA-1. In CRYPTO 2017; Springer: Berlin/Heidelberg, Germany, 2017; pp. 570–596. [Google Scholar] [CrossRef] [Scilit]
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.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.