Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2025 Nov 25;15:41918. doi: 10.1038/s41598-025-25929-x

Secure image encryption using a 4D chaotic system and Langton’s ant cellular automaton

Hamdan Alshehri 1,
PMCID: PMC12647653  PMID: 41290960

Abstract

The recent explosion of high-rate multimedia transfer has heightened the need for image ciphers that are lossless, payload-grade, and computationally efficient, yet fully structure-adaptive. Traditional block ciphers are effective for byte streams but do not account for spatial dependencies in images, while many chaos-based methods remain ad hoc, lacking strict invertibility and clear keying or synchronization mechanisms. Motivated by these gaps, we present a keyed image cipher that integrates a four-dimensional (4D) chaotic driver with a rule-adaptive variant of Langton’s Ant cellular automaton. The scheme performs pixel permutation followed by two mutually inverse decimal diffusions with cross-channel feedback, and a symbolic diffusion stage that encodes bytes into Ant symbols intermingled through three distinct, keystream- and rule-dependent operators. The core novelty is a provably bijective symbolic diffusion with an explicit inverse and a branch-number–style local diffusion lower bound, combined with a linear-time streaming implementation. The cipher passes the NIST SP 800-22 statistical tests on both keystream and ciphertext-derived bitstreams. Experiments on standard test images show NPCRInline graphic UACIInline graphic Shannon entropy Inline graphicbits/pixel, negligible adjacent-pixel correlations, high key sensitivity, and strong robustness against 20% salt-and-pepper noise and 20% occlusion. The overall key space is approximately Inline graphic, indicating high resistance to brute-force attacks.

Keywords: Image encryption, Chaotic systems, Langton’s Ant, Cellular automata, Symbolic diffusion

Subject terms: Engineering, Mathematics and computing, Physics

Introduction

Securing multimedia at scale demands ciphers tailored to the statistical structure, volume, and latency constraints of images and videos. Foundational treatments codify requirements for confidentiality, integrity, and authentication in modern communication systems1, while domain-specific designs demonstrate clinically oriented protection of medical images via DNA cryptography and elliptic curves2. A bibliometric review maps the role of cryptographic techniques across AI security, highlighting research trends and gaps3. Comprehensive surveys chart the landscape of chaos-based video encryption and its design tradeoffs4, and robust chaos-driven methods for medical imagery validate strong resistance to typical attacks5. DNA–chaos hybrids further enrich substitution and diffusion with nucleotide-inspired operations6. Beyond confidentiality alone, joint encryption–watermarking pipelines address social-image security in hybrid domains7.

Seminal work established chaotic dynamics as a fertile basis for cryptosystem design, deriving a chaotic encryption algorithm and motivating practical constructs8, and proposing symmetric ciphers based on two-dimensional (2D) maps that align with domain structure in images9. These designs operationalize Shannon’s confusion and diffusion principles for multimedia data10. A survey systematizes chaos-based image encryption across spatial, transform, and spatiotemporal domains, providing taxonomies of maps, architectures, and evaluation criteria11. Rigorous empirical security analyses caution against under-justified motivations and advocate comprehensive cryptanalytic testing12, while security measurement frameworks quantify robustness in chaos+DNA medical communication schemes13.

Classical map-based schemes illustrate the evolution from one-dimensional (1D) to 2D dynamics and beyond. Logistic-map encryption established lightweight confusion–diffusion with 1D dynamics14, and combinations of 1D maps enhanced color-image security with simple, fast primitives15. New 2D systems with hidden attractors enlarged the design space16. Enhanced hyperchaotic Hénon variants demonstrated efficient 2D encryption with improved statistical properties17. Transform-augmented chaos (e.g., cosine-transform-based systems) improved ergodicity and parameter sensitivity for image protection18, while cryptanalysis-driven improvements strengthened Feistel+dynamic DNA schemes by fixing weaknesses and refining diffusion paths19. A landmark 3D cat-map construction instantiated the canonical permutation–diffusion pipeline for images20, and fast chaotic primitives delivered high-throughput encryption suitable for real-time processing21.

A central trend is the move to high-dimensional and hyperchaotic dynamics to expand key space, increase Lyapunov exponents, and harden against statistical/brute-force attacks. Early demonstrations established the benefits of high-dimensional systems for image encryption22, and six-dimensional (6D) hyperchaotic designs combined with DNA encoding achieved very large key spaces with strong diffusion23. New four-dimensional (4D) chaotic systems with coexisting attractors and circuit implementations provided hardware-feasible chaotic sources24. An improved 4D system with evolutionary operators demonstrated robust performance on contemporary color images25. Quadratic polynomial hyperchaotic maps with pixel-fusion strategies yielded efficient ciphers with compelling security metrics26. Detailed dynamic analyses of 6D multistable memristive chaotic systems uncovered wide hyperchaotic regimes and demonstrated encryption applications27. Three-dimensional (3D) architectures leveraging segmentation-driven diffusion further increased mixing and sensitivity in the cipher pipeline28.

Memristive and neuromorphic chaos have emerged as versatile, hardware-amenable drivers. A 3D memristive cubic map with dual discrete memristors was designed, implemented, and applied to image encryption, illustrating compact circuits and strong dynamics29. A three-dimensional memristor-based hyperchaotic map was engineered for pseudorandom number generation (PRNG) and multi-image encryption, demonstrating parallelism and high entropy30. A parallel color-image cipher driven by a 2D logistic–Rulkov neuron map delivered throughput and security gains through neuron-inspired chaos31. For video, a discrete sinusoidal memristive Rulkov-neuron approach encrypted segments efficiently while maintaining strong security margins32. A fractional-order Hopfield neural-network-based framework was validated as a high-performance privacy-preserving approach33. Efficient chaotic image encryption was also realized via dynamic vector-level operations and a 2D-enhanced logistic modular map, improving diffusion and implementation efficiency34. Hardware-oriented work on memristive Hopfield networks demonstrated bursting firing dynamics, an image-encryption mechanism, and a corresponding implementation path35.

Hybrid constructions enrich confusion/diffusion with complementary primitives and coding layers. Substitution–permutation networks (SPNs) driven by chaos deliver strong nonlinearity and structural clarity in image encryption36. DNA–chaos ciphers were tailored for telemedicine and healthcare, emphasizing robustness under realistic conditions37. Dynamically synthesized S-boxes (e.g., double-affine or chaos-tuned) increased nonlinearity and thwarted differential attacks in efficient schemes38. DNA-computing and chaotic dynamics were co-designed to raise complexity and key sensitivity39, and chaos+DNA encoding formed the basis of effective image ciphers with strong avalanche effects40. Quantum-image directions complemented these efforts: an Arnold-transform/S-box scrambling scheme instantiated quantum image encryption operations41, and Lorenz hyperchaos provided a quantum-resilient trajectory for future-proof image protection42. Cellular-neural hybridization with DNA sequence operations supplied an additional pathway for spatial coupling and symbolic diffusion in images43. Multi-image pipelines were strengthened by combining hyperchaotic drivers with SVD and a modified RC5 layer for layered defense and improved resilience44.

Systematic cryptanalysis has been crucial in hardening designs. Entropy-based cryptanalysis exposed weaknesses in a chaotic scheme and guided corrective redesign45. Attacks on chaos-derived S-box encryption revealed structural flaws and motivated improved constructions46. A focused cryptanalysis of the 2D logistic-adjusted-sine map (LASM) family led to concrete improvements that restore security margins47.

Learning-based methods increasingly intersect with chaos to automate or adapt cipher components. A neural-network/chaos co-design enabled double-image encryption with enhanced flexibility48, and a CNN-assisted framework tightened confusion–diffusion coupling and supported data-driven parameterizations for improved security–efficiency tradeoffs49. In deployment-oriented research, real-time RGB encryption for IoT used enhanced chaotic sequences to meet latency and resource constraints without sacrificing robustness50.

Driven by these benefits, we propose a new image encryption scheme that integrates the strength and complexity of a four-dimensional (4D) chaotic system with the symbolic computational power of Langton’s Ant cellular automaton. This union provides strong confusion and diffusion through layered transformations (permutation plus dual diffusion) and addresses known weaknesses of lower-dimensional chaotic designs and conventional ciphers. In our evaluations, the scheme demonstrates strong resistance to brute-force search, differential cryptanalysis, and standard statistical attacks while remaining practical and efficient. Overall, the principal contributions of this paper include:

  • A keyed, lossless image encryption scheme coupling a 4D chaotic system with rule-adaptive Langton’s Ant symbolic encoding, integrating pixel reordering with two complementary diffusion layers (decimal and symbolic with inter-pixel feedback).

  • A formal derivation for the Ant-based symbolic diffusion showing bijectivity (explicit inverse) and a local diffusion guarantee (branch-number style lower bound), ensuring well-posed decryption and strong intra-pixel mixing.

  • A nonce-based KDF workflow to derive the initial chaotic state and working keys, a minimal header for stateless synchronization, and an optional tilewise re-seeding strategy for loss tolerance and parallelism.

  • Linear-time complexity O(MN) with O(1) extra memory in streaming form; naturally parallel on CPU/GPU. Constant factors are quantified in the complexity subsection.

  • Beyond histogram/correlation/entropy and differential tests (NPCR/UACI with 8-bit reference ranges), we report NIST SP 800-22 results (keystream and ciphertext-derived bitstreams, Inline graphic) using the two-level pass criteria, supporting near-ideal diffusion and randomness.

  • We position the scheme against classical chaos-based ciphers and recent cryptanalysis findings to motivate design choices; the resulting efficiency and robustness make it suitable for bandwidth- and latency-constrained scenarios (e.g., medical archives and remote-sensing imagery).

The paper has the following organization: We first introduce in detail the preliminaries necessary for the important concepts like chaotic systems, Langton’s Ant cellular automaton, and cryptographic operations utilized. We then outline the methodology of the proposed scheme with particular focus on its unique fusion of chaotic diffusion, symbol encoding, and dynamic key stream generation. We then evaluate our scheme exhaustively, supported by extensive simulations and security studies, to confirm its potency and resilience. Lastly, we conclude by summarizing our major findings and suggesting directions for further investigation, highlighting how our proposed scheme is well-suited to address current security demands.

Preliminaries

The suggested image encryption mechanism employs basic concepts and techniques outlined within the present section, specifically a 4D chaotic map, Langton’s Ant rule-based automaton, and cryptography involving permutation, confusion, and diffusion. These are the building blocks of the encryption scheme that provide tremendous security by their own intrinsic randomness and complexity.

4D chaotic system

The 4D chaotic system used in this study is defined Lai et al.24 by the following set of differential equations:

graphic file with name d33e451.gif 1

where Inline graphic are the state variables of the system and pqr are the control parameters. The system is initial condition and parameter value sensitive, wherein the initial condition and control parameter settings are being utilized as keys for encryption within the scheme.

To use the continuous-time driver in an iterative cipher, we discretize it with a fixed-step explicit Runge–Kutta method of order four (RK4), step size Inline graphic, in double precision. Writing Inline graphic and denoting the discrete state by Inline graphic, one RK4 update is

graphic file with name d33e484.gif

From a key/nonce-derived initial condition Inline graphic and fixed (pqr), we discard a warm-up of Inline graphic steps and then sample every step (stride Inline graphic) to produce MN samples for an Inline graphic image.

With initial condition Inline graphic and parameters Inline graphic, the system exhibits a butterfly-shaped chaotic attractor. Figure 1 specifies the viewed coordinates for each subplot: (a) 3D phase portrait in Inline graphic, (b) 2D projection in Inline graphic, (c) 3D phase portrait in Inline graphic, and (d) 2D projection in Inline graphic.

Fig. 1.

Fig. 1

Chaotic behavior of dynamical system.

All chaotic sequences were generated by discretizing the continuous 4D system with a fixed-step explicit Runge–Kutta method of order four (RK4) to ensure reproducibility. Let Inline graphic denote the state at discrete step n and Inline graphic the right-hand side of the ODE. With step size Inline graphic (double precision) each RK4 update is computed as

graphic file with name d33e572.gif

For reproducible keystreams we (i) use double-precision arithmetic, (ii) discard a warm-up of Inline graphic RK4 steps, and (iii) sample with stride Inline graphic thereafter to produce MN samples for an Inline graphic image. To extract bytes from a sampled state component Inline graphic we apply fractional-part extraction and scaling:

graphic file with name d33e596.gif

With the above Inline graphic, fixed system parameters, and a key/nonce-derived initial state Inline graphic, the RK4-based generator is fully reproducible.

Tent map

Tent map is a simple and robust piecewise linear chaotic map commonly used in cryptographic applications because it is highly sensitive to control parameters and initial conditions. It is defined as:

graphic file with name d33e613.gif 2

where Inline graphic, and Inline graphic and Inline graphic are control parameters determining the map shape and chaotic range. The tent map is used in the proposed image encryption scheme for the generation of pseudorandom sequences that control rule selection and key scheduling. Nonlinearity and uniform distribution of the tent map add to the unpredictability and diffusion properties of the cipher. By wrapping inputs to the valid domain via the use of modular arithmetic, outputs are ensured to be bounded, and the system is suitable for iterated application within digital systems. This incorporation aids the resistance of the system to statistical and differential attacks.

Chaotic state variable selection: rationale and overview

Key determinants to ensure the proposed encryption technique is cryptographically strong are the careful choice and usage of chaotic state variables. The sequences generated by the chaotic map, embodied within 4D difference equations, demonstrate all the features of increased sensitivity toward initial values, deterministic randomness, and long-term unpredictability. This section, therefore, discusses at length the method applied to effectively choose the chaotic state variables by drawing from the CDSVSP outlined within the relevant literature.

Chaotic dynamical state variables selection procedure

In order to adopt chaotic sequences with reduced algorithmic complexity, the Chaotic Dynamical State Variables Selection Procedure is changed as follows:

Generation of Chaotic Sequence: The 4D chaotic dynamical system is iterated for Inline graphic times, where Inline graphic to avoid transient dynamics, with the size of the total pixels being given by Inline graphic (256 pixels in the current scenario)

Chaotic State Definition: A chaotic system at each iteration generates four different variables Inline graphic. These chaotic states map to pixel intensity values, which are stored as a 1D list Inline graphic.

Selection Criterion for Variables: A dynamically computed index is used for each pixel Q(i) to choose the state variable V(i) from the chaotic set. The index for selection, which is referred to as Inline graphic, is

graphic file with name d33e687.gif

where the tent map provides randomness and where Inline graphic are secret key parameters

graphic file with name d33e695.gif

Langton’s ant cellular automaton

Langton’s Ant is coupled with the chaotic driver to introduce a discrete, rule-based symbolic layer that complements the continuous-state chaos. This layer provides per-pixel, key-driven transformations that enhance confusion and diffusion.

Alphabet and rule selection. Let Inline graphic be the symbolic alphabet. For each pixel index i, a rule

graphic file with name d33e713.gif

is derived from the chaotic keystream (details in Step 3). Each rule Inline graphic is associated with a bijection (encoding) Inline graphic; Inline graphic may be the identity or the complement, depending on Inline graphic, so that different rules induce distinct binary embeddings of Inline graphic.

Decimal-to-symbolic mapping. For an 8-bit (256-level) pixel value Inline graphic, we take its binary expansion, group bits into pairs, and map each pair to a symbol in Inline graphic according to a rule-dependent table (cf. Table 1). For example, Inline graphic has binary (11100110); under Rule 2 this yields pairs (11, 10, 01, 10) and the symbolic word Inline graphic by the Rule 2 column in Table 1.

Table 1.

Binary-to-Ant mapping (rule-dependent).

Binary Pair Rule 1 Rule 2 Rule 3 Rule 4 Rule 5 Rule 6 Rule 7 Rule 8
00 R L R L R L R L
01 L R L R L R L R
10 R R L L R R L L
11 L L R R L L R R

Three distinct symbolic operators. To avoid collapse into a single operation, we define three distinct, invertible, rule- and keystream-dependent operators on Inline graphic via their binary embeddings. Let Inline graphic and write Inline graphic. Let Inline graphic be keystream bits (or functions of the previous cipher symbol) chosen so that at least one of Inline graphic is 1 for every i (this guarantees non-identical truth tables). Define:

graphic file with name d33e917.gif

where Inline graphic is bitwise XOR and Inline graphic. Because the image of each operator is of the form Inline graphic with a different boolean function Inline graphic per operator (and Inline graphic or Inline graphic whenever Inline graphic or Inline graphic), the three Inline graphic truth tables are not identical at index i and vary with Inline graphic.

Symbolic diffusion update and invertibility. Let Inline graphic be the pre-diffusion symbols for a pixel (after encoding). With selector Inline graphic, we apply a triangular in-place update using the distinct operators above:

graphic file with name d33e988.gif

In the binary domain this is Inline graphic, Inline graphic, Inline graphic with operator-specific boolean functions Inline graphic determined by Inline graphic. The map is bijective with explicit inverse:

graphic file with name d33e1013.gif

followed by Inline graphic to recover symbols. Thus decryption is well-posed.

Figure 2 shows the Langton’s ant after 99,999 steps.

Fig. 2.

Fig. 2

Langton’s ant after 99,999 steps.

Proposed encryption scheme

In this section, we outline the holistic methodology underpinning the Proposed Image Encryption Scheme (PIES), which combines synergistically a 4D chaotic dynamical system with a cellular automaton to provide robust cryptographic security. For clarity, readability, and easy comprehension, the framework of encryption has been strictly demarcated into separate phases: initial chaotic data generation and preprocessing, generation of chaotic keystream, pixel permutation, symbolic encoding through cellular automaton rules, multi-stage diffusion with decimal and symbolic operations, and, ultimately, reconstruction of encrypted cipher image. This high-powered synergy of transformation comprising decimal-based diffusion, chaotic permutation, and symbolic processing through automata especially strengthens the resistance of the cipher, ensuring great resistance against statistical, differential, and brute-force attacks. What’s more, this concise and representative flowchart is provided to clearly present each step, hence ensuring easy comprehension, readability, and replicability of the methodology of encryption.

Image preprocessing and chaotic sequence initialization

Consider an RGB image of dimensions Inline graphic with three distinct colour channels: Red (Inline graphic), Green (Inline graphic), and Blue (Inline graphic). Each channel is reshaped into a linear 1D vector of length Inline graphic, defined as:

graphic file with name d33e1062.gif

To produce high-quality chaotic sequences for encryption, we initialize the 4D chaotic system with secret initial conditions. The chaotic system is numerically integrated for Inline graphic steps, ensuring elimination of transient dynamics, with Inline graphic. The integration results in four distinct chaotic sequences:

graphic file with name d33e1074.gif

where each sequence Inline graphic, for Inline graphic, comprises chaotic values employed as secure sources of randomness throughout subsequent encryption stages. Initial state variables Inline graphic are assigned from the first elements of the chaotic sequences generated, such as Inline graphic

Chaotic-based keystream generation mechanism

The robustness of the proposed image encryption scheme primarily arises from a Chaotic-Based Keystream Generation Mechanism (CBKGM), integrating outputs from the 4D chaotic system with Langton’s Ant automaton rules. This mechanism ensures extreme sensitivity to initial conditions, such that slight variations in input data or secret parameters yield drastically different key sequences, thus fortifying the cryptographic strength.

Initially, the RGB channel vectors Inline graphic, Inline graphic, and Inline graphic are combined into a single composite sequence Inline graphic, utilizing secret integer multipliers Inline graphic, as follows:

graphic file with name d33e1121.gif

For each pixel index Inline graphic, the tent map, parameterized by two secret parameters Inline graphic, generates a chaotic-based index Inline graphic by:

graphic file with name d33e1145.gif

The value Inline graphic determines the selection among the four chaotic sequences Inline graphic. For each selected sequence, associated counters Inline graphic track the accessed elements, and the chaotic variable Inline graphic is chosen accordingly:

graphic file with name d33e1166.gif

Next, the fractional component of this chaotic value Inline graphic is extracted and magnified to generate an 8-bit key value through:

graphic file with name d33e1174.gif

Repeating this procedure iteratively for all pixel indices, a secure keystream Inline graphic is constructed:

graphic file with name d33e1183.gif

This generated keystream is utilized in the subsequent encryption phases to ensure effective confusion and diffusion. The described key-generation process inherently achieves high sensitivity and unpredictability, ensuring strong resistance against various cryptanalytic methods. The overall procedure for keystream generation is clearly depicted in Fig. 3.

Fig. 3.

Fig. 3

Keystream generation procedure.

Encryption procedure

The suggested image encryption scheme gains increased crypto-security through orderly combining chaotic key streams, pixel shuffling, and symbolic calculations derived from Langton’s Ant cellular automaton. Each operation plays an appreciable part towards confusion and diffusion, which prevents the image from being attacked statistically and cryptographically. To enhance clarity, image size is Inline graphic, with total pixels Inline graphic.

Step 1: Initial Decimal-Level Diffusion

Let Inline graphic be the three chaotic keystreams. Define initial feedback bytes from the available keystream at index 0:

graphic file with name d33e1213.gif

Then, for all Inline graphic,

graphic file with name d33e1221.gif

Output: Arrays Inline graphic.

Step 2: Pixel Permutation Using Chaotic Sequences

To eliminate spatial correlations, the pixel values are permuted using chaotic sequences:

  1. Concatenate channels into a single vector Inline graphic of length Inline graphic:
    graphic file with name d33e1250.gif
  2. Generate permutation indices Inline graphic from a chaotic tent map:
    graphic file with name d33e1262.gif
    where Inline graphic are chaotic map parameters.
  3. Reorder the elements of Inline graphic:
    graphic file with name d33e1279.gif
  4. Divide the permuted vector Inline graphic back into RGB channels:
    graphic file with name d33e1291.gif

Output: Arrays Inline graphic.

Step 3: Langton’s Ant Symbolic Encoding and Diffusion

  1. Decimal-to-symbolic conversion. Let Inline graphic be the Ant alphabet. For each pixel index i, select the rule
    graphic file with name d33e1319.gif
    from the chaotic keystream k(i), and use the rule-dependent encoder Inline graphic with binary embedding Inline graphic to map 8-bit channel values to symbolic words (pairwise mapping per Table 1):
    graphic file with name d33e1341.gif
    where Inline graphic.
  2. Symbolic-level diffusion (distinct, keystream- and rule-dependent). Define keystream-controlled bits Inline graphic with Inline graphic for all i. For Inline graphic with Inline graphic and Inline graphic, define the three distinct Ant operators:
    graphic file with name d33e1383.gif
    with Inline graphic. Let Inline graphic denote the current symbols (componentwise over the length-4 words) and set the selector Inline graphic from a chaotic sequence L(i). Apply the triangular in-place update:
    graphic file with name d33e1406.gif

Output and decode back to decimal. Set Inline graphic and recover the post-diffusion decimal values via the inverse encoder:

graphic file with name d33e1418.gif

Step 4: Symbolic-to-Decimal Conversion

Convert symbolic ant-sequences back to decimal using the same rule-based mappings influenced by chaotic sequences:

graphic file with name d33e1425.gif

Output: Decimal arrays Inline graphic.

Step 5: Final Decimal-Level Diffusion

Perform a final diffusion on the transformed decimal pixel arrays with fresh chaotic keystreams Inline graphic. For each pixel Inline graphic:

graphic file with name d33e1448.gif

Output: Arrays Inline graphic.

Step 6: Cipher Image Reconstruction

Reshape the final encrypted arrays to Inline graphic:

graphic file with name d33e1468.gif

Combine channels to form encrypted cipher image:

graphic file with name d33e1472.gif

Output: Final encrypted image Inline graphic.

The flow chart of encryption procedure is shown in Fig. 4.

Fig. 4.

Fig. 4

Encryption procedure.

Simulation environment and evaluation

Simulations of the effectiveness and reliability of the given approach for encrypting images were conducted under MATLAB R2022b on a windows operating system based on an Intel® Core i5 processor and having 16 GB of DDR5 RAM. IEEE 754-compliant double-precision arithmetic was applied in all calculations in order to ensure numerical accuracy for chaotic integration and pixel transformation.

With regards to encrypting images in a digital context, protection against attacks including those that are cryptanalytic in nature based on chosen-plaintext, known-ciphertext attacks, differential attacks, and brute-force attacks is essential. The aim of this research is a secure encryption system that is highly sensitive to conditions of initiation yet efficiently computable.

To ensure validation of the proposed scheme, a set of predetermined benchmark images was extracted from the USC-SIPI Image Database. More specifically, images Baboon, Tree, and House were employed, resized to a consistent resolution of Inline graphic pixels in order to ensure uniformity throughout the experimental pipeline.

For simulation purposes, the 4D chaotic system was initialized using the following parameters: noindent For simulation purposes, the initial conditions and system parameters were selected as: Inline graphic and Inline graphic

A sufficiently small adaptive step size was employed in the numerical solver to ensure chaotic behavior was preserved throughout the integration process.

This encryption scheme was applied against each of these images, resulting in highly scrambled cipher images as depicted in Fig. 5b. The encrypted outputs show total loss of spatial structure, as expected for confirming that the system can properly obfuscate visual content. Decrypted images corresponding to these encrypted images are shown in Fig. 5c and closely resemble the original input images provided that proper secret keys are employed illustrating both reversibility and resilience. Importantly, even minimal changes in the original conditions (e.g., on the order of Inline graphic) lead to inability to recover the plaintext, underscoring strong key sensitivity and security robustness of the scheme.

Fig. 5.

Fig. 5

(a) Original (b) Encrypted (c) Decrypted images (USC-SIPI standard image database).

These results affirm that the proposed encryption scheme not only achieves strong diffusion and confusion but also maintains high fidelity during decryption, making it a viable candidate for secure multimedia transmission.

Discussion

The encryption approach described in this paper couples a four–state chaotic flow system with a discrete Langton’s Ant cellular automaton, providing a two-layer defense that specializes in both confusion and diffusion. The continuous subsystem-controlled by Inline graphic and Inline graphic is highly sensitive to its initialization point, a feature of high-dimensional chaos. Even an infinitely small perturbation of the initialization vector generates an entirely different trajectory, thus increasing the key space and significantly constraining exhaustive search or differential attack feasibility.

Impact of the 4D flow. In comparison to single- or 2D chaotic maps, four-variable model produces a significantly more diverse set of pseudo-random sequences. These sequences induce pixel permutation and decimal-level diffusion, distributing two images encrypted using nearly identical keys far apart in cipher space within a short period. The behavior hinders chosen-plaintext and known-plaintext attacks since an imperceptibly small key deviation spreads throughout the entire image.

Role of Langton’s Ant. After the decimal mixing has been carried out, pixel values are encoded into symbolic strings consisting of L and R symbols based on the dynamic rule set. The symbolic operations-Ant XOR, Ant addition, and Ant subtraction-scramble these symbols. Since the automaton is deterministic but highly random, the resulting cipher has uniform histograms and low neighboring correlation, key markers for statistical and differential probing resistance.

Computational considerations. All computation within the chaotic core is based on light algebraic expressions; even the use of the tent map for generation of indices is particularly efficient. Additionally, red, green, and blue channels are processed independently from one another, allowing for efficient parallel processing on today’s multi core CPUs or GPUs. As a result, the approach achieves high security assurances without requiring prohibitive run times or memory requirements and is appropriate for use in real-time image systems.

Practical keying and synchronization. Our cipher is a keyed, lossless symmetric scheme; in deployment, a session key can be established via a standard public-key mechanism (e.g., KEM/ECDH) and is combined with a per-image unique nonce to derive all working material by a KDF (e.g., HKDF-SHA256), including the encryption key, an integrity key, and the initial chaotic state (mapped deterministically from the KDF output). A compact header carries protocol version and the nonce (and optionally a sequence/tile index) so sender and receiver remain statelessly synchronized. For loss tolerance and parallelism, the image may be processed in fixed tiles, each re-seeded from the same KDF using the tile index; thus any tile can be decrypted independently when its header is present. To prevent malleability and replays, we recommend encrypt-then-MAC (e.g., HMAC over header+ciphertext) and enforcing nonce uniqueness. These measures add only a small constant overhead and do not change the scheme’s O(MN) time and O(1) extra-space characteristics in the streaming variant.

Security analysis

In image cryptography, there are two primary needs: there must be a high degree of security, and there must be strength against a broad set of cryptanalytic attacks. A cryptographic scheme that is secure must be shown to withstand traditional and contemporary forms of attack, such as chosen-plaintext (CPA), chosen-ciphertext (CCA), statistical, differential, and exhaustive brute-force. Therefore, any image encryption scheme’s design must favor strength against all of the above adversarial models while, at the same time, being computationally efficient and practically deployable.

Key space analysis

One primary measure for assessing the strength of a cryptographic scheme is key space size, which is the number of all different combinations of secret parameters available for use. A large enough key space is required for resisting brute-force attacks. In this scheme, two components are used for obtaining the key space, namely, (1) parameters taken from the chaotic dynamical system (CDS), and (2) discrete secret values for use in key scheduling.

Chaotic Dynamical System (CDS) Parameters. The initialization of the 4D chaotic flow involves the following continuous-valued parameters:

graphic file with name d33e1606.gif

each represented using 64-bit IEEE-754 double-precision floating-point format. This allows approximately Inline graphic distinguishable values per parameter. Consequently, the total key space contributed by the CDS is

graphic file with name d33e1614.gif

Key Scheduling Parameters. The second component of the key space consists of 25 independent 32-bit integers, which are utilized as follows:

graphic file with name d33e1620.gif

Each 32-bit integer can assume Inline graphic possible values, yielding a key space of

graphic file with name d33e1629.gif

Total Key Space. Assuming independence between the CDS parameters and the integer keys, the combined key space of the proposed scheme is given by

graphic file with name d33e1635.gif

The 25 independent 32-bit integers in Table 2 are consumed as follows, tying the key-space breakdown to the pipeline.

Table 2.

Key Space Breakdown.

Category Parameters Key Space Size
Chaotic Dynamical System Inline graphic (7 doubles) Inline graphic
Key Scheduling Inline graphic, Inline graphic, Inline graphic (25 integers) Inline graphic
Total Inline graphic

(i) Diffusion order selector d. Let Inline graphic Inline graphic. We set Inline graphic and process channels in order Inline graphic in Step 1 (decimal diffusion with feedback) and Step 3 (symbolic diffusion).

(ii) Six triplets Inline graphic, Inline graphic. These parameterize (a) pixel reordering and (b) the operator toggles in Step 3.

(a) Permutation offsets: for pass i, apply the coordinate shift

graphic file with name d33e1748.gif

followed by a fixed, keystream-driven shuffle (details as in the permutation step).

(b) Symbolic-operator toggles: with keystream bytes Inline graphic,

graphic file with name d33e1761.gif

used in the distinct Ant operators Inline graphic and Inline graphic of Step 3; if Inline graphic we flip Inline graphic to ensure non-identity behavior.

(iii) Channel masks Inline graphic. One-time per image:

(a) Plaintext pre-whitening: Inline graphic, Inline graphic, Inline graphic (used in Step 1).

(b) Keystream tweak: Inline graphic, Inline graphic, Inline graphic (drop-in replacement in Step 1).

Table 3 compares key space of the proposed scheme with some other available algorithms.

Table 3.

Key Space comparison.

Algorithm Key Space
Proposed Inline graphic
Li & Chen.23 Inline graphic
Pareek et al.14 Inline graphic
Hua et al.18 Inline graphic

Secret key sensitivity analysis

Key sensitivity is an essential trait of encryption schemes based on the sensitivity of a cipher image toward variations, including tiny shifts, in key parameters. This is important since it makes it difficult for attackers to use minute variations of keys for decryption. In order to analyze the sensitivity of our encryption scheme with respect to a key, a minimal deviation of Inline graphic has been introduced for a single initial parameter Inline graphic while maintaining all the remaining initial parameters Inline graphic, Inline graphic, and Inline graphic unchanged. So, the varied parameter is given by Inline graphic

Eight benchmark images, specifically Lena, Baboon, Peppers, Tree, House, Beans, F16, and Girl, were encrypted with respect to both the original and slightly perturbed keys. The respective cipher images were compared quantitatively with traditional metrics of security: Number of Pixels Change Rate (NPCR) and Unified Average Changing Intensity (UACI). The results obtained from these tests are summarized in Table 4, demonstrating the sensitivity of our scheme clearly and numerically.

Table 4.

NPCR and UACI Metrics Under Key Variation Test.

Test Image NPCR (%) UACI (%)
Red Green Blue Red Green Blue
House 99.6374 99.6589 99.6311 33.4428 33.4219 33.3873
Girl 99.6087 99.6196 99.6234 33.4982 33.4641 33.4098
Beans 99.6471 99.6093 99.6159 33.4725 33.3927 33.4154
Tree 99.6325 99.6547 99.6018 33.4913 33.4276 33.4628
Lena 99.6429 99.6132 99.6394 33.3668 33.4871 33.4125
Peppers 99.6261 99.5959 99.6177 33.3954 33.4039 33.4751
F16 99.6398 99.6077 99.6445 33.4569 33.4495 33.3692
Baboon 99.6184 99.6215 99.6267 33.3827 33.4784 33.4193
Average 99.6316 99.6226 99.6251 33.4258 33.4406 33.4189

The NPCR measurement examines the percent of pixels within the cipher images that change as a result of the applied key perturbation, while UACI measures an average difference of intensities for matching pixels within two encrypted images. Seen in Table 4, average NPCR values for Red, Green, and Blue channels are 99.6316%, 99.6226%, and 99.6251%, respectively. These figures ascertain that almost all of the pixels are dramatically modified by even a tiny change within the encryption key.

Further, calculated average UACI values for respective RGB channels are 33.4258%, 33.4406%, and 33.4189%, indicating significant intensity variations for encrypted images for even small variations of keys. For instance, for an image of Lena, NPCR values are 99.6374%, 99.6589%, and 99.6311% for RGB channels, and UACI values are 33.4428%, 33.4219%, and 33.3873% for respective channels. The sensitivity of the above values is observable for all the remaining images, including Baboon and Peppers. These experimental findings highlight the sensitivity of the encryption process to initial parameters, proving its robustness against differential cryptanalysis. The extremely high values of NPCR and UACI clearly demonstrate the strength of confusion and diffusion operations adopted by the given encryption process, proving it effective for image encryption purposes.

Entropy analysis

Information entropy, first conceptualized by Claude Shannon, gives a measure of the unpredictability or randomness among data sets. In image encryption, entropy measures how randomly and evenly pixel values are distributed. Ideally, encrypted images must have entropy values close to the theoretical limit of 8 bits per pixel for 8-bit grayscale or color images. This maximal entropy would mean encrypted images are nearly indistinguishable from random noise, and statistical or cryptographic analysis would be virtually impossible for attackers.

To assess the performance of the suggested encryption scheme, entropy values for encrypted and original images were calculated with great care. For testing, a collection of standard images were chosen, namely Lena, Baboon, Peppers, Tree, House, Beans, F16, and Girl. The Inline graphic for every image channel was calculated using the standard equation:

graphic file with name d33e2161.gif 3

where Inline graphic denotes the probability of pixel intensity Inline graphic, and Inline graphic is the pixel bit-depth.

The entropy results, summarized in Table 5, demonstrate a significant increase after encryption, underscoring the effectiveness of the proposed scheme in achieving near-maximal entropy.

Table 5.

Entropy Comparison for Original and Encrypted Images.

Image Original Encrypted
Red Green Blue Red Green Blue
Tree 7.2456 7.5897 6.9624 7.9983 7.9979 7.9980
Beans 7.7032 7.4708 7.7481 7.9991 7.9992 7.9990
Peppers 7.3368 7.4739 7.0521 7.9978 7.9976 7.9979
House 7.2086 7.4097 6.9175 7.9977 7.9978 7.9976
Lena 6.4289 6.5343 6.2287 7.9995 7.9984 7.9986
Baboon 5.7892 6.2147 6.7949 7.9972 7.9973 7.9974
F16 6.7133 6.7952 6.2104 7.9990 7.9989 7.9988
Girl 5.7112 5.3699 5.7083 7.9979 7.9978 7.9977
Average 6.7671 6.8573 6.7028 7.9981 7.9979 7.9979

The entropy values, tabulated in Table 5, show a remarkable increase upon encryption, emphasizing the efficiency of the suggested scheme at reaching nearly maximal entropy.

As an example, for the image of Lena, entropy became dramatically better from initial values of 7.2456, 7.5897, and 6.9624 for RGB channels to encrypted values of 7.9983, 7.9979, and 7.9980, respectively. All images tested showed comparable behavior, with average values of about 7.9981, 7.9979, and 7.9979 for red, green, and blue channels, respectively, post-encryption. These results clearly show that encrypted images were nearly at theoretical maximum entropy, and hence are powerful against statistical extraction attacks.

Table 6 is used for comparing the entropy performance of our scheme with existing contemporary encryption techniques. The figures demonstrate the better entropy level that our approach enjoys, emphasizing its ability to create securely randomized cipher images.

Table 6.

Entropy Comparison with Recent Encryption Schemes.

Image Encryption Scheme Entropy (bits)
Lena Proposed Scheme 7.9989
Lena Li & Chen23 7.9991
Lena Zhao et al.17 7.9974
Lena Belazi et al.36 7.9963
Lena Khan et al.38 7.9991

In all, the entropy analysis substantiates how the above-described encryption scheme is indeed able to transform images into visually and statistically undistinguishable patterns of random noise. Therefore, this scheme is capable of guaranteeing high entropy and possesses remarkable ability towards image data protection against statistical cryptanalytic attacks.

Correlation analysis

Pixel correlation is a measure of linear co-dependency between adjacent pixels within an image. Normally, natural images have strong correlations between neighboring pixels, with values nearly unity, indicative of smooth gradient and visual coherence. A secure scheme of encryption must dramatically destabilize such correlations, preferably bringing them close to values of zero for all spatial directions horizontal, vertical, and diagonal. In order to evaluate the efficiency of our encryption scheme for eliminating correlations among pixels, we calculated adjacent-pixel correlations between the original and encrypted versions of typical test images such as Lena, Baboon, Peppers, Tree, House, Beans, F16, and Girl. The values for these correlations are listed separately for each color channel and for horizontal, vertical, and diagonal orientations in Table 7.

Table 7.

Correlation Coefficients for Adjacent Pixels in Original and Encrypted Images.

Image Direction Red (Orig.) Red (Enc.) Green (Orig.) Green (Enc.) Blue (Orig.) Blue (Enc.)
Lena Horizontal 0.9451 Inline graphic0.001927 0.9207 0.002113 0.8752 0.003245
Lena Vertical 0.9698 Inline graphic0.000345 0.9551 Inline graphic0.001835 0.9130 Inline graphic0.001578
Lena Diagonal 0.9211 0.0002476 0.8989 0.002668 0.8552 0.001294
Baboon Horizontal 0.9225 0.002385 0.8650 Inline graphic0.001497 0.9065 Inline graphic0.002350
Baboon Vertical 0.8657 Inline graphic0.000962 0.7659 0.001622 0.8803 0.002134
Baboon Diagonal 0.8538 0.001729 0.7342 Inline graphic0.002008 0.8391 0.001945
Peppers Horizontal 0.9429 0.001182 0.9570 Inline graphic0.002946 0.9347 0.001803
Peppers Vertical 0.9457 Inline graphic0.002364 0.9598 0.003256 0.9376 Inline graphic0.002590
Peppers Diagonal 0.9091 0.001054 0.9259 Inline graphic0.002383 0.8964 0.001512
Tree Horizontal 0.9596 Inline graphic0.002378 0.9691 0.001487 0.9620 0.002936
Tree Vertical 0.9365 0.002896 0.9461 Inline graphic0.001653 0.9412 Inline graphic0.002403
Tree Diagonal 0.9163 Inline graphic0.001742 0.9312 0.002019 0.9270 Inline graphic0.000915
House Horizontal 0.9664 0.001094 0.9798 Inline graphic0.002718 0.9812 0.001435
House Vertical 0.9349 Inline graphic0.002319 0.9468 0.001026 0.9744 Inline graphic0.002381
House Diagonal 0.9122 0.001836 0.9315 Inline graphic0.002960 0.9620 0.000849
Beans Horizontal 0.9730 Inline graphic0.001987 0.9702 0.002735 0.9775 Inline graphic0.001249
Beans Vertical 0.9736 0.001053 0.9739 Inline graphic0.001530 0.9790 0.001982
Beans Diagonal 0.9473 Inline graphic0.002678 0.9465 0.001437 0.9578 Inline graphic0.002314
F16 Horizontal 0.9720 0.002197 0.9572 Inline graphic0.001758 0.9634 0.002413
F16 Vertical 0.9564 Inline graphic0.002581 0.9673 0.002760 0.9349 Inline graphic0.001686
F16 Diagonal 0.9340 0.002749 0.9318 Inline graphic0.002393 0.9141 0.001457
Girl Horizontal 0.9773 Inline graphic0.001840 0.9742 0.002396 0.9720 Inline graphic0.002648
Girl Vertical 0.9289 0.002053 0.9102 Inline graphic0.002541 0.9126 0.001798
Girl Diagonal 0.9123 Inline graphic0.001547 0.8937 0.002972 0.8952 Inline graphic0.002083

Table 7 shows that original images reflect extremely high values of correlation, usually within a range of about 0.73-0.98, which confirms an immense redundancy and linear relationship among pixel intensities. Encrypted images, by contrast, reflect drastically lower values of correlation coefficient (roughly from -0.003 to +0.003), which clearly signifies that there is minimal relationship between neighboring pixels. This drastic drop confirms our strong confusion and diffusion measures for protection. Scatter plots of pixel intensities further demonstrate such outcomes, shown by Fig. 6. Pixels from original images are, at first, clumped together along a straight line, which demonstrates a strong linear relationship. Post-encryption, however, pixel distributions are random and scattered without any discernible patterns, which confirms that correlations of pixels are successfully scrambled.

Fig. 6.

Fig. 6

Correlation distribution of adjacent pixels in the original and encrypted images. (a) Horizontal, (b) Vertical, (c) Diagonal.

Comparisons with the alternative methods, presented in Table 8, again support our’s greater or equivalent ability to achieve minimum correlation in all spatial directions. These tests validate that the described encryption scheme indeed eliminates spatial redundancy, yielding strong statistical attack resistance.

Table 8.

Comparison of Correlation Coefficients.

Image Algorithm Horizontal Vertical Diagonal
Lena Proposed Inline graphic0.001927 Inline graphic0.000345 0.0002476
Lena Li & Chen23 Inline graphic0.0014 Inline graphic0.0012 Inline graphic0.0058
Lena Pak & Huang15 Inline graphic0.0038 Inline graphic0.0026 0.0017
Lena Khan et al.38 Inline graphic0.0026 0.0001 0.0027
Lena Zhao et al.17 Inline graphic0.0002 0.0012 Inline graphic0.0013

Histogram

The histogram of an image is a representation of the distribution of pixel intensities. In plaintext images, such plots often show strong points and troughs reflecting dominant color or intensities. For instance, a well-lit image huddles pixel counts toward the upper end of the intensity scale, while a dark image leans toward smaller values. These patterns reflect the natural redundancy of pictures and are vulnerable points for statistical-type attacks.

An effective encryption would level out such distributions so that no value of an intensity occurs more than any other. The histogram of an encrypted image would be white noise, which means that the encryption has completely scattered pixel values throughout the dynamic range and removed any recognisable structure.

Figure 7 illustrates this phenomenon for the Peppers test image. Histograms for the red, green, and blue channels are given by subfigures 7a–c, respectively. The left-hand plots (plain-image curves) exhibit distinct peaks testimony to there being intensity clustering. As a result of encryption, right-hand plots for every panel reflect nearly perfectly flat histograms, proving that suggested scheme has successfully destroyed the initial statistical features.

Fig. 7.

Fig. 7

Pixel–intensity histograms for the Peppers image before and after encryption. Uniform post encryption histograms confirm thorough diffusion.

The homogeneity shown by Fig. 7 confirms that the integration of the 4D chaotic map and Langton’s Ant symbolic diffusion adequately conceals intrinsic image structure. Consequently, histogram analysis-based statistical attacks receive no benefits, and overall security is even further enhanced by the suggested scheme.

In addition to visual inspection of histograms, dispersion within the histogram itself can be numerically evaluated using the variance of pixel-count frequencies. High variance would imply that individual intensity bins contain substantially more (or significantly fewer) pixels than others, while a lower, more consistent variance would imply a flatter or roughly uniform distribution. In terms of encryption, an ideal cipher would generate a histogram with a variance within a tight band for a range of secret keys, an indicator of a consistent flattening of intensity frequencies.

To verify this behaviour, we encrypted eight standard colour images (Lena, Baboon, Peppers, Tree, House, Beans, F16, and Girl) under nine distinct secret key sets, labelled Inline graphic through Inline graphic. For each experiment, the variance of the RGB histogram counts of the cipher image was recorded. The outcomes appear in Table 9. All values cluster tightly around Inline graphic, confirming that no intensity range dominates irrespective of the chosen key.

Table 9.

Histogram–variance values (pixel–count variance) under nine independent keys.

Image Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic
Lena 5471.5 5459.3 5464.2 5452.8 5460.5 5462.1 5456.9 5459.8 5470.7
Baboon 5462.8 5467.4 5468.1 5472.6 5462.3 5459.7 5458.4 5462.5 5455.2
Peppers 5452.1 5447.9 5465.4 5459.8 5463.2 5465.9 5470.6 5461.5 5472.1
Tree 5455.0 5464.2 5453.1 5457.2 5461.5 5466.1 5464.7 5457.8 5460.2
House 5445.8 5457.3 5460.1 5452.7 5462.9 5472.8 5468.4 5460.9 5471.3
Beans 5483.9 5456.8 5468.3 5458.9 5476.1 5463.0 5461.1 5459.2 5439.7
F16 5457.2 5460.7 5463.4 5461.9 5464.8 5458.6 5463.3 5466.8 5464.4
Girl 5469.4 5458.2 5450.5 5460.8 5480.4 5465.1 5457.9 5453.1 5444.6
Average 5462.2 5459.7 5461.1 5457.1 5466.5 5464.2 5462.6 5459.1 5459.8

The limited spread of variance values among various images and keys validates that the suggested cipher regularly scatters pixel intensities, leaving histograms with minimal apparent structure. Statistical evenness enhances the scheme’s histogram-based cryptanalysis immunity by denying an attacker exploitable patterns of intensities.

Chi-square analysis

The chi-squared (Inline graphic) test gives a quantitative measure of whether an image’s histogram is approximating a target distribution, which for our purposes is a uniform distribution an ideal cipher would generate. For a given pixel intensity level Inline graphic with Inline graphic, let Inline graphic be the observed bin count and Inline graphic be the expected value for an

graphic file with name d33e3620.gif

Large Inline graphic values result from strong peak or valley deviations, while those approaching theoretical expectation mean that intensities are distributed nearly evenly.

Table 10 presents eight benchmark image Inline graphic values before and after encryption. In all cases, plaintext values are very high sometimes over Inline graphic as expected for strong intensity clustering. Postencryption, counterparts drop down to a low-hundred range, proving that the given scheme has successfully flattened histograms.

Table 10.

Chi-square values of RGB channels for original and encrypted images.

Image Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic
Lena Inline graphic 248.31 Inline graphic 233.33 Inline graphic 280.61
Baboon Inline graphic 282.29 Inline graphic 245.03 Inline graphic 284.15
Peppers Inline graphic 250.30 Inline graphic 266.81 Inline graphic 274.62
Tree Inline graphic 252.62 Inline graphic 283.20 Inline graphic 230.88
House Inline graphic 287.62 Inline graphic 244.98 Inline graphic 249.77
Beans Inline graphic 298.42 Inline graphic 297.19 Inline graphic 265.94
F16 Inline graphic 278.59 Inline graphic 236.50 Inline graphic 265.00
Girl Inline graphic 262.02 Inline graphic 231.71 Inline graphic 260.10

As an exemplary case, Lena’s red channel is reduced from Inline graphic plaintext to mere Inline graphic upon encryption more than two orders of magnitude. All channels and images are reduced similarly. Such a steep drop attests that the cipher properly redistributes intensities of pixels so that histograms well approximate a flat profile. Statistical attacks based on histogram discrepancies are therefore made useless.

Differential cryptanalysis

Differential cryptanalysis evaluates the sensitivity of an image cipher to tiny plaintext changes (e.g., flipping one pixel) by measuring how strongly those changes propagate through the ciphertext. Two standard metrics are the Number of Pixels Change Rate (NPCR) and the Unified Average Changing Intensity (UACI). For two ciphertexts Inline graphic and Inline graphic produced from plaintexts that differ at exactly one pixel on an Inline graphic image (per channel), define

graphic file with name d33e3912.gif

Reference ranges (8-bit). Under the ideal assumption that ciphertext pixels are independent uniforms on Inline graphic, the per-pixel change probability is Inline graphic, so Inline graphic, with a binomial Inline graphic confidence band

graphic file with name d33e3935.gif

where N is the number of pixels used in the computation (per channel; if NPCR/UACI are computed jointly over RGB, then Inline graphic and the band narrows). For UACI, letting Inline graphic with Inline graphic gives Inline graphic and Inline graphic, yielding a Inline graphic band

graphic file with name d33e3967.gif

We report NPCR/UACI together with these theoretical expectations to indicate whether the observed values are consistent with ideal diffusion.

Table 11 presents NPCR/UACI for standard test images; the values cluster around the ideal Inline graphic (NPCR) and Inline graphic (UACI) benchmarks for 8-bit data, indicating strong diffusion and sensitivity to plaintext changes.

Table 11.

Differential Cryptanalysis Results.

Image NPCR UACI
Lena 99.625 33.478
Baboon 99.671 33.516
Peppers 99.582 33.492
Tree 99.643 33.505
House 99.554 33.489
Beans 99.601 33.533
F16 99.612 33.429
Girl 99.842 33.564

As shown in Table 12, the proposed scheme achieves NPCR/UACI consistent with the theoretical expectations for ideal 8-bit diffusion and comparable to recent schemes, further supporting robustness against differential attacks.

Table 12.

Comparison of NPCR and UACI Values.

Algorithm NPCR UACI
Proposed 99.639 33.461
Khan et al38 99.6117 33.4090
Pak & Huang15 99.6277 33.4132
Zhao et al.17 99.56 33.25

Mean square error (MSE) and peak signal to noise ratio analysis (PSNR)

Peak Signal-to-Noise Ratio (PSNR) is often applied in image encryption assessment for gauging the distortion from an original image to an encrypted image. PSNR measures the loss or change due to encryption by determining how distinct a cipher image is from an original image. Developed based on a Mean Squared Error (MSE), PSNR actually calculates an average of squared image intensities difference between said two images.

where MM is image size, and Inline graphic and Inline graphic are pixel values at location (ij) of the original and encrypted images, respectively. The larger the value of MSE, the larger is the overall difference between the Based on calculated MSE, PSNR is given by:

graphic file with name d33e4142.gif

where 255 is the maximum pixel value for 8–bit images. Generally, a high PSNR signifies image similarity. In image encryption, on the contrary, a lower PSNR (about 7-10 dB) is used, reflecting a high level of encryption-induced distortion and, by extension, high security. Table 13 gives PSNR values for benchmark images encrypted by the suggested approach. Low values of PSNR indicate drastic changes in encrypted images, which are undistinguishable without decryption.

Table 13.

Comparison of the PSNR Values.

Image Lena Baboon Peppers Tree House Beans F16 Girl
Algorithm PSNR (dB)
Proposed 8.479 8.832 8.297 8.174 8.742 8.612 7.924 9.887
Man et al.48 9.635
Alexan et al.44 8.096 8.921
Norouzi et al.43 8.507 9.352 8.812 7.936

Robustness to noise and data-loss attacks

An effective cipher must be decryptable even when partially corrupted data are transmitted, either by channel distortion or intentional tampering. In order to measure such robustness, we applied two different perturbations to three test images (House, Peppers, and Baboon). Salt-and-pepper noise with a density of Inline graphic applied over the encrypted. Occlusion wherein a rectangular block (about Inline graphic of image area) was filled with zeros during encryption. For every experiment, disturbed ciphertext was passed through the decryption routine unmodified and without error correction to see if visual content could still be recovered.

Figure 8 illustrates the salt-and-pepper trial. Despite having a dense Inline graphic noise, decrypted outputs retain nearly all visual details with only minimal speckle arte facts. This is an affirmation that the underlying diffusion process disperses pixel dependencies so far apart that plaintext remains identifiable even with random bit flips.

Fig. 8.

Fig. 8

Salt-and-pepper experiment (left to right for each row): (a) original image, (b) cipher image after noise injection, (c) decrypted result. (USC-SIPI standard image database).

An analogous result is seen in the occlusion test (Fig. 9). Despite missing one-fifth of every piece of ciphertext, decryption restores most of the scene showing tolerance of contiguous data loss by the scheme.

Fig. 9.

Fig. 9

Damaged ciphertexts containing a Inline graphic black block. Corresponding decryptions (USC-SIPI standard image database).

These experiments demonstrate the strength of the cipher against stochastic noise and targeted erasure. The pseudorandomness of the chaotic key schedule coupled with Langton’s-Ant symbolic diffusion guarantees that details from each pixel are spread throughout all of the ciphertext. As a result of this, damage that is local only influences local parts of the decrypted image, yet global recognisability is preserved. This fault-tolerance is essential for real-world usage within channels that introduce errors or partial packet loss.

NIST SP 800-22 statistical tests

Beyond histogram/correlation/entropy/NPCR–UACI, we evaluate randomness using the NIST SP 800-22 suite on (i) the raw keystream and (ii) ciphertext-derived bitstreams. For each test image and seed, we form a bitstream by concatenating ciphertext bytes LSB-first; we also test the same-length keystream. We adopt significance level Inline graphic and NIST-recommended parameters (e.g., Block Frequency with Inline graphic; Non-overlapping Templates with Inline graphic; Serial/Approximate Entropy with Inline graphic–16 depending on sequence length). The battery includes Frequency (Monobit), Block Frequency, Runs, Longest Run, Rank, Discrete Fourier Transform (Spectral), Cumulative Sums, Non-overlapping and Overlapping Template Matching, Serial, Approximate Entropy, and Linear Complexity (Random Excursions/Variant are applied when path-length criteria hold). Pass criteria follow NIST’s two-level procedure: each individual p-value must exceed Inline graphic, and both the pass proportion and the uniformity-of-p-values (chi-square) statistic must satisfy NIST thresholds. Detailed p-values for the encrypted House image are shown in Table 14.

Table 14.

NIST SP 800-22 tests for the encrypted House image. P-value(1)–(6) are six independent seeds for the same ciphertext-derived bitstream; “success” indicates all six Inline graphic.

Test name P-value(1) P-value(2) P-value(3) P-value(4) P-value(5) P-value(6) result
approximate entropy 0.5127 0.6938 0.2714 0.9475 0.3651 0.2288 success
block-frequency 0.6384 0.1426 0.8412 0.6037 0.9128 0.3095 success
cumulative sums forward 0.4315 0.2231 0.4826 0.7062 0.9741 0.3958 success
Discrete Fourier Transform (Spectral) 0.2572 0.5189 0.0934 0.7425 0.1876 0.2633 success
frequency test 0.5724 0.3619 0.2787 0.1164 0.7341 0.4152 success
linear complexity 0.9235 0.0847 0.4412 0.2985 0.6683 0.5128 success
long runs of ones 0.1539 0.7042 0.2217 0.3194 0.5526 0.2832 success
non-overlapping templates 0.1342 0.3961 0.8124 0.2043 0.7365 0.1589 success
overlapping templates 0.1758 0.2647 0.6415 0.1563 0.2874 0.1196 success
rank 0.8021 0.5643 0.4237 0.6869 0.3715 0.7482 success
runs 0.9518 0.6137 0.1984 0.9365 0.2879 0.8743 success
serial 1 0.7634 0.1482 0.9047 0.0723 0.8195 0.9921 success
serial 2 0.8349 0.0916 0.7112 0.5384 0.9067 0.9749 success
universal 0.7446 0.6129 0.2517 0.1925 0.8013 0.2149 success

Two-level check. All individual Inline graphic; the pass proportion is 6/6, which lies in the NIST interval Inline graphic for Inline graphic and Inline graphic, and the uniformity Inline graphic (chi-square) for each test exceeded 0.0001. Note: Random Excursions/Variant were not applicable for this image’s bitstreams due to path-length prerequisites.

Computational complexity

Let the input be an Inline graphic color image with three 8-bit channels. We write Inline graphic for the total number of bytes processed (equivalently, MN pixels across three channels). The encryption pipeline consists of image preprocessing, pixel reordering (permutation), chaotic keystream generation, symbolic encoding with Langton’s Ant, multi-stage diffusion, and final image reconstruction. Each stage touches every pixel a constant number of times; therefore, each stage runs in O(MN) time and the overall complexity is

graphic file with name d33e4711.gif

In constant-factor terms, our reference implementation executes a bounded warm-up for the chaotic driver (independent of MN) and then a fixed number of linear passes over the image. Aggregating the passes across all stages yields an operation count of approximately Inline graphic primitive pixel-level updates in total. Equivalently, writing Inline graphic bytes, one may express Inline graphic as Inline graphic with Inline graphic and a warm-up constant Inline graphic (independent of MN).

If the keystream list Inline graphic is fully materialized, the extra memory beyond the image buffers is Inline graphic. Alternatively, Q can be generated and consumed on the fly during encryption, reducing the additional memory to Inline graphic aside from a small constant-size state. Our implementation follows this streamed variant.

All three RGB channels are processed independently, and the stage-wise operations are data-parallel. On a machine with k parallel workers (CPU threads or GPU blocks), the wall-clock work approaches Inline graphic up to scheduling and I/O overheads, without changing the asymptotic counts.

AES (CTR mode). AES-CTR encrypts in 16-byte blocks with Inline graphic time and Inline graphic extra space (excluding I/O buffers). With hardware support (e.g., AES-NI), the constant factor is very small, but the asymptotics remain linear in payload size. RSA (public-key). RSA uses modular exponentiation with cost superlinear in key size (e.g., Inline graphic for Inline graphic-bit keys with classical arithmetic) and is therefore unsuitable for bulk media. In practice, RSA wraps a symmetric session key (hybrid encryption), incurring a one-time key-encapsulation overhead, while the image payload is handled by a symmetric cipher (e.g., AES-CTR) or, in our case, the proposed stream-like construction. Thus, for payload throughput, the appropriate comparison is AES-CTR (linear time, O(1) space) versus our scheme (linear time, O(1) space in streaming form), while RSA contributes only a one-off key-wrap cost.

Conclusion

Natural images exhibit strong spatial redundancy and large payloads, so practical ciphers must be lossless, efficient, and secure against statistical, differential, and synchronization-related attacks. Many chaos-based constructions fall short on formal invertibility, synchronization, or reproducible numerical settings, creating a gap between laboratory demonstrations and deployable designs. This work addresses that gap by uniting a reproducible 4D chaotic driver with a rule-adaptive Langton’s Ant layer to obtain a cipher that is both structurally simple and formally invertible.

The proposed scheme derives all working material from a session key and per-image nonce via a KDF, initializes a 4D continuous-time chaotic system discretized by RK4, and uses a tent-map selector to adaptively draw from the four state variables. Encryption proceeds through cross-coupled decimal diffusion, chaotic permutation, and a symbolic diffusion stage in which bytes are mapped to Ant symbols and mixed by three distinct, keystream- and rule-dependent operators in a triangular in-place update before a final decimal diffusion and reconstruction. A compact header enables stateless synchronization and optional tilewise re-seeding, supporting parallelism and loss tolerance without sacrificing reproducibility.

Conceptually, the work provides a bijective symbolic diffusion with an explicit inverse and a local diffusion guarantee. It offers a concrete keying and synchronization workflow suitable for deployment. It also features a linear-time streaming implementation with O(1) extra memory, which is amenable to CPU/GPU parallelization. The evaluation combines standard image-security tests with the NIST SP 800-22 suite applied to both the keystream and ciphertext-derived bitstreams. This strengthens the empirical case for randomness.

Across standard benchmarks, the cipher achieves near-ideal diffusion and randomness: NPCR around 99.6%, UACI around 33.46%, entropy close to 8 bits/pixel, and negligible adjacent-pixel correlations, alongside consistent NIST SP 800-22 passes at Inline graphic. It is highly sensitive to keys and robust to substantial perturbations, successfully decrypting under Inline graphic salt-and-pepper noise and Inline graphic occlusion. The estimated key space is on the order of Inline graphic, and the end-to-end complexity remains Inline graphic with straightforward parallelism, indicating favorable practicality.

This study focuses on empirical/statistical security rather than formal indistinguishability proofs, and it does not exhaustively benchmark throughput against highly optimized block ciphers across heterogeneous hardware or very high resolutions. Implementation aspects related to side-channel resilience and broader parameter stress testing under finite precision are also outside the present scope. Future work will incorporate authenticated encryption for integrity and replay protection, broaden datasets to medical and remote-sensing imagery, extend performance studies to larger resolutions and diverse platforms, including FPGA/ASIC, and investigate alternative chaotic drivers and adaptive symbolic rules that preserve bijectivity. Taken together, the results suggest a credible pathway for secure image storage and transmission in bandwidth- and latency-sensitive settings while leaving clear directions for hardening and system-level integration.

Acknowledgments

The authors gratefully acknowledge the funding of the Deanship of Graduate Studies and Scientific Research, Jazan University, Saudi Arabia, through project number: RG24-S0162.

Author contributions

H.A. did all the work for this manuscript.

Data availability

All the data used to finding the results is included in the manuscript.

Declarations

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.Blahut, R. E. Cryptography and Secure Communication (eds Huang, Y. H., Xue, M. F. & Xu, J.) 1st ed 270–294 (China Machine Press, 2018).
  • 2.Kumaran, V. S. et al. A secure medical image encryption technique based on DNA cryptography with elliptic curves. Sci. Rep.15(1), 20003 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Taherdoost, H., Le, T. V. & Slimani, K. Cryptographic techniques in artificial intelligence security: A bibliometric review. Cryptography9(1), 17 (2025). [Google Scholar]
  • 4.Gao, S. et al. Chaos-based video encryption techniques: A review. Comput. Sci. Rev.58, 100816 (2025). [Google Scholar]
  • 5.Yasser, I., Khalil, A. T., Mohamed, M. A., Samra, A. S. & Khalifa, F. A robust chaos-based technique for medical image encryption. IEEE Access10, 244–257 (2021). [Google Scholar]
  • 6.Chai, X., Chen, Y. & Broyde, L. A novel chaos-based image encryption algorithm using DNA sequence operations. Opt. Lasers Eng.88, 197–213 (2017). [Google Scholar]
  • 7.Ye, C. et al. Social image security with encryption and watermarking in hybrid domains. Entropy27(3), 276 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Matthews, R. On the derivation of a chaotic encryption algorithm. Cryptologia13(1), 29–42 (1989). [Google Scholar]
  • 9.Fridrich, J. Symmetric ciphers based on two-dimensional chaotic maps. Int. J. Bifurc. Chaos8(06), 1259–1284 (1998). [Google Scholar]
  • 10.Shannon, C. E. Communication theory of secrecy systems. Bell Syst. Tech. J.28(4), 656–715 (1949). [Google Scholar]
  • 11.Zia, U. et al. Survey on image encryption techniques using chaotic maps in spatial, transform and spatiotemporal domains. Int. J. Inf. Secur.21(4), 917–935 (2022). [Google Scholar]
  • 12.Preishuber, M., Hutter, T., Katzenbeisser, S. & Uhl, A. Depreciating motivation and empirical security analysis of chaos-based image and video encryption. IEEE Trans. Inf. Forensics Secur.13(9), 2137–2150 (2018). [Google Scholar]
  • 13.Chen, L., Li, C. & Li, C. Security measurement of a medical communication scheme based on chaos and DNA coding. J. Vis. Commun. Image Represent.83, 103424 (2022). [Google Scholar]
  • 14.Pareek, N. K., Patidar, V. & Sud, K. K. Image encryption using chaotic logistic map. Image Vis. Comput.24(9), 926–934 (2006). [Google Scholar]
  • 15.Pak, C. & Huang, L. A new color image encryption using combination of the 1D chaotic map. Signal Process.138, 129–137 (2017). [Google Scholar]
  • 16.Wang, C. & Ding, Q. A new two-dimensional map with hidden attractors. Entropy20(5), 322 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Zhao, H., Xie, S., Zhang, J. & Wu, T. Efficient image encryption using two-dimensional enhanced hyperchaotic Henon map. J. Electron. Imaging29(2), 023007 (2020). [Google Scholar]
  • 18.Hua, Z., Zhou, Y. & Huang, H. Cosine-transform-based chaotic system for image encryption. Inf. Sci.480, 403–419 (2019). [Google Scholar]
  • 19.Feng, W., Qin, Z., Zhang, J. & Ahmad, M. Cryptanalysis and improvement of the image encryption scheme based on Feistel network and dynamic DNA encoding. IEEE Access9, 145459–145470 (2021). [Google Scholar]
  • 20.Chen, G., Mao, Y. & Chui, C. K. A symmetric image encryption scheme based on 3D chaotic cat maps. Chaos Solitons Fractals21(3), 749–761 (2004). [Google Scholar]
  • 21.Liu, W., Sun, K. & Zhu, C. A fast image encryption algorithm based on chaotic map. Opt. Lasers Eng.84, 26–36 (2016). [Google Scholar]
  • 22.Fu-Yan, S., Shu-Tang, L. & Zong-Wang, L. Image encryption using high-dimension chaotic system. Chin. Phys.16(12), 3616 (2007). [Google Scholar]
  • 23.Li, Q. & Chen, L. An image encryption algorithm based on 6-dimensional hyper chaotic system and DNA encoding. Multimed. Tools Appl.83(2), 5351–5368 (2024). [Google Scholar]
  • 24.Lai, Q., Nestor, T., Kengne, J. & Zhao, X. W. Coexisting attractors and circuit implementation of a new 4D chaotic system with two equilibria. Chaos Solitons Fractals107, 92–102 (2018). [Google Scholar]
  • 25.Niu, Y., Zhou, H. & Zhang, X. Image encryption scheme based on improved four-dimensional chaotic system and evolutionary operators. Sci. Rep.14(1), 7033 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Feng, W. et al. Exploiting robust quadratic polynomial hyperchaotic map and pixel fusion strategy for efficient image encryption. Expert Syst. Appl.246, 123190 (2024). [Google Scholar]
  • 27.Yu, F. et al. Dynamic analysis and application of 6D multistable memristive chaotic system with wide range of hyperchaotic states. Axioms14(8), 638 (2025). [Google Scholar]
  • 28.Xu, J., Zhao, C. & Mou, J. A 3D image encryption algorithm based on the chaotic system and the image segmentation. IEEE Access8, 145995–146005 (2020). [Google Scholar]
  • 29.Gao, S. et al. A 3D memristive cubic map with dual discrete memristors: Design, implementation, and application in image encryption. IEEE Trans. Circuits Syst. Video Technol.35(8), 7706–7718 (2025). [Google Scholar]
  • 30.Gao, S. et al. A three-dimensional memristor-based hyperchaotic map for pseudorandom number generation and multi-image encryption. Chaos35(7), 073105 (2025). [DOI] [PubMed] [Google Scholar]
  • 31.Gao, S. et al. A parallel color image encryption algorithm based on a 2D logistic-rulkov neuron map. IEEE Internet Things J.12(11), 18115–18124 (2025). [Google Scholar]
  • 32.Gao, S. et al. Encrypt a story: A video segment encryption method based on the discrete sinusoidal memristive Rulkov neuron. IEEE Trans. Depend. Secure Comput. 1-15 (2025)
  • 33.Feng, W. et al. Integrating fractional-order hopfield neural network with differentiated encryption: Achieving high-performance privacy protection for medical images. Fractal Fract.9(7), 426 (2025). [Google Scholar]
  • 34.Li, H. et al. Exploiting dynamic vector-level operations and a 2D-enhanced logistic modular map for efficient chaotic image encryption. Entropy25(8), 1147 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Yu, F., He, S., Yao, W., Cai, S., & Xu, Q. Bursting firings in memristive hopfield neural network with image encryption and hardware implementation. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. (2025).
  • 36.Belazi, A., Kachouane, M. & El-Latif, A. A. A. A novel image encryption scheme based on substitution-permutation network and chaos. Signal Process.160, 45–58 (2019). [Google Scholar]
  • 37.El-Shafai, W., Khallaf, F., El-Rabaie, E. S. M. & El-Samie, F. E. A. Robust medical image encryption based on DNA-chaos cryptosystem for secure telemedicine and healthcare applications. J. Ambient. Intell. Humaniz. Comput.12, 9007–9035 (2021). [Google Scholar]
  • 38.Khan, M. et al. An efficient image encryption scheme based on double affine substitution box and chaotic system. Integration81, 108–122 (2021). [Google Scholar]
  • 39.Chai, X., Gan, Z., Lu, Y., Chen, Y. & Han, D. A novel image encryption algorithm based on the chaotic system and DNA computing. Int. J. Mod. Phys. C28(05), 1750069 (2017). [Google Scholar]
  • 40.Wang, X. & Liu, C. A novel and effective image encryption algorithm based on chaos and DNA encoding. Multimed. Tools Appl.76, 6229–6245 (2017). [Google Scholar]
  • 41.Liu, H., Zhao, B. & Huang, L. Q. Quantum image encryption scheme using Arnold transform and S-box scrambling. Entropy22(4), 343 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42.Zhou, R. G. & Li, Y. B. Quantum image encryption based on Lorenz hyper-chaotic system. Int. J. Quantum Inf.22(1), 2250022 (2024). [Google Scholar]
  • 43.Norouzi, B. & Mirzakuchaki, S. An image encryption algorithm based on DNA sequence operations and cellular neural network. Multimed. Tools Appl.76, 13681–13701 (2017). [Google Scholar]
  • 44.Alexan, W. et al. A new multiple image encryption algorithm using hyperchaotic systems, SVD, and modified RC5. Sci. Rep.15(1), 9775 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 45.Li, C., Lin, D., Feng, B., Lü, J. & Hao, F. Cryptanalysis of a chaotic image encryption algorithm based on information entropy. IEEE Access6, 75834–75842 (2018). [Google Scholar]
  • 46.Zhu, C., Wang, G. & Sun, K. Cryptanalysis and improvement on an image encryption algorithm design using a novel chaos based S-box. Symmetry10(9), 399 (2018). [Google Scholar]
  • 47.Feng, W., He, Y., Li, H. & Li, C. Cryptanalysis and improvement of the image encryption scheme based on 2D logistic-adjusted-sine map. IEEE Access7, 12584–12597 (2019). [Google Scholar]
  • 48.Man, Z., Li, J., Di, X., Sheng, Y. & Liu, Z. Double image encryption algorithm based on neural network and chaos. Chaos Solitons Fractals142, 110431 (2021).33199943 [Google Scholar]
  • 49.Feng, L., Du, J., Fu, C. & Song, W. Image encryption algorithm combining chaotic image encryption and convolutional neural network. Electronics12(16), 3455 (2023). [Google Scholar]
  • 50.Trujillo-Toledo, D. A. et al. Real-time RGB image encryption for IoT applications using enhanced sequences from chaotic maps. Chaos Solitons Fractals153, 111506 (2021). [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

All the data used to finding the results is included in the manuscript.


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES