Secure image exchange over cloud networks with neural key exchange protocol Authors: Wassim Alexan, Youstina Megalli, Maran Malak, Salma Khaled, Maggie Mashaly Published: 2026 ABSTRACT AbstractIn this article, a novel image encryption algorithm is proposed for the secure transmission and storage of images over the cloud. The robustness of Tree Parity Machines (TPMs) is utilized in conjunction with DNA coding, Mersenne Twister-based DNA sequence generation, SHA-512 seeded Rule 30 Cellular Automata (CA), and S-box construction to achieve comprehensive multi-layered image encryption. The encryption process is initiated through the use of TPMs, which are employed to facilitate secure key exchange among users communicating over the cloud. The weight vectors of the TPMs are utilized as an initial shared symmetric key, and through iterative weight synchronization, the final weights are evolved into the actual encryption keys. DNA coding is then applied as the first layer of encryption. The corresponding DNA sequences are generated using the Mersenne Twister, which is employed as a Pseudo-Random Number Generator (PRNG). Subsequently, the SHA-512 hashing function is used to generate a seed for Rule 30 Cellular Automata, which is further utilized to construct another PRNG. This newly generated PRNG is applied as an additional key in an XOR operation with the image data, thereby providing an extra layer of security. The same CA-based PRNG is also used to construct an S-box, which is applied in the final encryption stage. Excellent results in terms of security, resistance to attacks, and computational efficiency are demonstrated through performance evaluation. The algorithm is shown to possess strong potential for secure and efficient real-time multimedia transmission and storage over the cloud. A significant advancement in secure cloud-based image communication is offered through the integration of TPMs, DNA coding, and CA in this unique encryption scheme. Moreover, quantitative evaluation further confirms the robustness of the proposed scheme, achieving encrypted image entropy of 7.99904, a high NPCR of 99.60897% and a UACI of 32.26675%, reflecting strong sensitivity to plain text variations, while maintaining an MSE of 10141.88 and PSNR of 8.11 dB.Keywords: Cellular automata, Image encryption, Mersenne twister, Tree parity machines, NIST analysis, S-boxSubject terms: Computational biology and bioinformatics, Engineering, Mathematics and computing Introduction The ubiquity of cloud-backed storage and content distribution has been accompanied by a transformation in how high-volume multimedia assets, particularly images, are produced, shared, and consumed across geographically dispersed and heterogeneous endpoints1,2. Applications ranging from telemedicine and medical imaging archives to intelligent transportation systems, remote sensing, and surveillance are characterized by the continuous exchange of sensitive visual data over semi-trusted or untrusted networks3,4. Through this data movement, the attack surface is amplified and the confidentiality, integrity, and availability of images are exposed to risks such as eavesdropping, ciphertext manipulation, key compromise, metadata leakage, and traffic analysis5. Although conventional block ciphers and stream ciphers are supported by well-studied security assumptions, the deployment of such ciphers for real-time image services over cloud environments can be constrained by: (i) overhead introduced by key distribution and rotation across multi-tenant, ephemeral, or serverless deployments6; (ii) fragility of modes of operation when ciphertext malleability or format constraints are present7; (iii) performance variability driven by large payloads, data-parallel pipelines, and device heterogeneity8,9; and (iv) diffusion and confusion that may be insufficient against image-specific statistics, for example large spatial correlations and nonuniform histograms, which are commonly exploited by cryptanalysis targeting visual data10. In this work, a multi-layer image encryption framework is proposed in which neural synchronization-based key establishment is combined with multiple statistically orthogonal diffusion and confusion mechanisms tailored to image characteristics. Specifically, Tree Parity Machines (TPMs) are utilized to realize an interactive key agreement protocol over a public channel. The emergent synchronized weight vectors are used as high-entropy, session-specific symmetric material without reliance on pre-shared secrets or public-key certificates11,12. From these TPM-derived secrets, seeds for distinct pseudo-random number generators (PRNGs) and substitution structures are deterministically derived and are then used to drive complementary encryption layers13: (i) bitwise masking with PRNG key-streams; (ii) content-preserving DNA coding disturb local intensity statistics while invertibility is maintained; and (iii) S-box-based nonlinear substitution that is constructed and quality-gated via cryptographic criteria, including nonlinearity (NL), strict avalanche criterion (SAC), bit independence criterion (BIC), linear approximation probability (LAP), and differential approximation probability (DAP)14–17. Diversification of entropy sources is achieved by employing a Mersenne Twister (MT) generator and a SHA-512 seeded Rule-30 elementary cellular automaton (CA) so that structural biases are reduced and resistance against known-plaintext and chosen-plaintext attacks is strengthened18,19. At a high level, the proposed system is composed of: Key establishment: a TPM two-party synchronization protocol by which two final weight vectors are yielded. By applying SHA-512 over these vectors, seeds that parameterize the subsequent cryptographic primitives are generated. Key establishment: a TPM two-party synchronization protocol by which two final weight vectors are yielded. By applying SHA-512 over these vectors, seeds that parameterize the subsequent cryptographic primitives are generated. Diffusion and confusion: three encryption layers, namely (L1) XOR masking and S-box substitution driven by MT; (L2) DNA mapping and DNA arithmetic, for example addition or subtraction, by which spatial statistics are decorrelated at the symbol level; and (L3) CA-driven XOR masking followed by an independently generated S-box substitution. Through these layers, diffusion, nonlinearity, and avalanche effects are jointly intensified. Diffusion and confusion: three encryption layers, namely (L1) XOR masking and S-box substitution driven by MT; (L2) DNA mapping and DNA arithmetic, for example addition or subtraction, by which spatial statistics are decorrelated at the symbol level; and (L3) CA-driven XOR masking followed by an independently generated S-box substitution. Through these layers, diffusion, nonlinearity, and avalanche effects are jointly intensified. Adaptive S-box synthesis: an iterative synthesis-and-test process by which S-boxes are accepted only when a configurable proximity threshold to idealized cryptographic indicators is met, so that weak instantiations are mitigated and robust substitution behavior is ensured. Adaptive S-box synthesis: an iterative synthesis-and-test process by which S-boxes are accepted only when a configurable proximity threshold to idealized cryptographic indicators is met, so that weak instantiations are mitigated and robust substitution behavior is ensured. Adherence to the design principle of defense in depth is followed by this architecture, and orthogonal security properties are contributed by each layer20. Static key provisioning is eliminated by TPM synchronization; a long period and high-dimensional equidistribution are provided by MT; computationally efficient key-streams with favorable randomness indicators are produced by Rule-30 CA21; structured yet invertible symbol transformations resistant to histogram and correlation-based analysis are introduced by DNA operations; and increased nonlinearity that complicates linear and differential cryptanalysis is provided by vetted S-boxes. The overall pipeline is engineered to remain lightweight and parallelizable so that alignment with real-time constraints common in cloud-based image services is achieved9. The threat model in this work is defined for a cloud/network environment in which the communication channel is public and the cloud is semi-trusted. It is assumed that an adversary can (i) eavesdrop on all transmitted data, including TPM synchronization messages (shared input vectors and exchanged output bits) and ciphertext images, and (ii) store and analyze observed traffic offline. Known-plaintext and chosen-plaintext settings are further considered, in which plaintext-ciphertext pairs may be obtained or encryptions of chosen images may be requested within a session. The security objective is confidentiality of the image and the computational infeasibility of recovering session keys or distinguishing ciphertext structure from random. For active attacks, it is assumed that TPM synchronization messages are authenticated (e.g., via a MAC, certificates, or a secure side channel). Without authentication, independent synchronized weights could be established by a man-in-the-middle (MITM) adversary with each party, similar to unauthenticated key agreement protocols. Finally, confidentiality is prioritized by the proposed scheme and an explicit integrity mechanism is not included; therefore, resistance to chosen-ciphertext/decryption-oracle attacks is not claimed unless an authentication layer (e.g., Encrypt-then-MAC or AEAD) is combined with the scheme. Although the proposed scheme is applicable to cloud networks, the cloud environment introduces threats beyond a traditional point-to-point channel. In particular, multi-tenancy and shared physical resources may enable cross-tenant leakage (e.g., via side channels), virtualization-layer compromise (VM/container escape or malicious hypervisors) may expose data in memory, and insecure cloud APIs/IAM misconfigurations (e.g., overly permissive roles, exposed object storage, snapshot/backup access) may lead to unauthorized disclosure or tampering22. The proposed method primarily mitigates confidentiality risks for data in transit and at rest by ensuring that images stored or routed through a semi-trusted cloud remain unintelligible without the session keys derived from authenticated TPM synchronization. However, protection against endpoint compromise, malicious host/hypervisor memory inspection, or control-plane/API takeover is outside the cipher’s scope and should be addressed with complementary cloud controls (e.g., strong IAM and audit policies, secure key management/HSM/KMS, TLS, and optionally TEEs), and integrity should be ensured by deploying AEAD or Encrypt-then-MAC alongside the encryption pipeline23. The main technical contributions of this manuscript are: Neural key agreement for images: a practical integration of Tree Parity Machine synchronization is presented as a certificate-free, session-oriented key exchange for cloud image encryption, and reliance on pre-distributed symmetric keys or heavyweight public-key infrastructures in multi-tenant settings is eliminated. Neural key agreement for images: a practical integration of Tree Parity Machine synchronization is presented as a certificate-free, session-oriented key exchange for cloud image encryption, and reliance on pre-distributed symmetric keys or heavyweight public-key infrastructures in multi-tenant settings is eliminated. Dual-PRNG entropy diversification: a deterministic derivation of two independent key-stream sources from TPM outputs, namely Mersenne Twister and SHA-512 seeded Rule-30 CA, is achieved so that structural correlation is reduced and resistance against distinguishing attacks and PRNG-specific weaknesses is enhanced. The synchronized weight vectors and are never transmitted. Thus, attacks such as known-plaintext attacks (KPA) become infeasible. Dual-PRNG entropy diversification: a deterministic derivation of two independent key-stream sources from TPM outputs, namely Mersenne Twister and SHA-512 seeded Rule-30 CA, is achieved so that structural correlation is reduced and resistance against distinguishing attacks and PRNG-specific weaknesses is enhanced. The synchronized weight vectors and are never transmitted. Thus, attacks such as known-plaintext attacks (KPA) become infeasible. DNA-coded confusion and diffusion: a reversible DNA coding layer that operates at the nucleotide-symbol level, with well-defined arithmetic and logical operations, is employed so that adjacent pixels are decorrelated and image histograms are flattened while exact invertibility is preserved. DNA-coded confusion and diffusion: a reversible DNA coding layer that operates at the nucleotide-symbol level, with well-defined arithmetic and logical operations, is employed so that adjacent pixels are decorrelated and image histograms are flattened while exact invertibility is preserved. Quality-gated S-box construction: a seed-dependent S-box generation mechanism driven by MT and CA seeds is used, and acceptance is performed only when composite cryptographic metrics, including nonlinearity, SAC, BIC, LAP, and DAP, meet configurable thresholds. By this procedure, high-quality nonlinear substitution layers are yielded. Quality-gated S-box construction: a seed-dependent S-box generation mechanism driven by MT and CA seeds is used, and acceptance is performed only when composite cryptographic metrics, including nonlinearity, SAC, BIC, LAP, and DAP, meet configurable thresholds. By this procedure, high-quality nonlinear substitution layers are yielded. End-to-end, three-layer cipher design: a cohesive pipeline is constructed by which XOR masking, S-box substitution, and DNA arithmetic are combined in an alternating sequence, namely PRNG to S-box to DNA to CA-PRNG to S-box, so that avalanche behavior is strengthened and differential and linear cryptanalysis is complicated. End-to-end, three-layer cipher design: a cohesive pipeline is constructed by which XOR masking, S-box substitution, and DNA arithmetic are combined in an alternating sequence, namely PRNG to S-box to DNA to CA-PRNG to S-box, so that avalanche behavior is strengthened and differential and linear cryptanalysis is complicated. Comprehensive security evaluation: an extensive suite of empirical tests, including histogram uniformity, information entropy, inter-pixel correlation, MSE and PSNR, MAE, NPCR and UACI, key-space estimation, execution time, and NIST SP 800-22 randomness tests, is conducted. Through these evaluations, strong confusion and diffusion, resistance to statistical and differential attacks, and competitive runtimes suitable for real-time or near real-time cloud operation are demonstrated. Comprehensive security evaluation: an extensive suite of empirical tests, including histogram uniformity, information entropy, inter-pixel correlation, MSE and PSNR, MAE, NPCR and UACI, key-space estimation, execution time, and NIST SP 800-22 randomness tests, is conducted. Through these evaluations, strong confusion and diffusion, resistance to statistical and differential attacks, and competitive runtimes suitable for real-time or near real-time cloud operation are demonstrated. Cloud suitability: an implementation strategy and parameterization compatible with cloud deployments, where session keys must be frequently refreshed and endpoints are usually heterogeneous, are provided so that scalable and secure multimedia storage and transmission are supported. Cloud suitability: an implementation strategy and parameterization compatible with cloud deployments, where session keys must be frequently refreshed and endpoints are usually heterogeneous, are provided so that scalable and secure multimedia storage and transmission are supported. The key novelty beyond integration of various value-adding constructs is described as follows. Although TPM synchronization, DNA operations, Rule-30 cellular automata, and the Mersenne Twister are individually established, a synchronization-conditioned key/key-stream construction is introduced in which these components are coupled in a manner that measurably alters security and robustness behavior. Specifically, seed material is derived from the final synchronized TPM weight vectors, and cryptographic hashing is applied to obtain fixed-length, high-entropy seeds. Two independently generated pseudo-random streams (Rule-30 CA-derived and MT-derived) are then driven by these seeds, assigned distinct roles in the cipher pipeline (e.g., one primarily for confusion/substitution control and the other for diffusion/masking), and subsequently mixed. Through this separation-and-mixing design, reliance on any single generator is reduced, and the effective key material is bound to the synchronized dynamics of the communicating parties rather than to a static, externally chosen key. It is important to note that TPM is used as a lightweight, interactive key agreement supported mainly by empirical/parameter-based analyses; it is not claimed to provide DH/ECC-style proof-based AKE security; deployments needing provable AKE can swap in (EC)DH without changing the rest of the pipeline. The quantifiable distinctions of this research work are then provided as follows. Measurable gains produced by this mechanism are validated against representative baselines that use only TPM-derived keys, only CA-based key-streams, or DNA operations without synchronization-bound seeding, as reported in the performance evaluation section (“Performance analysis and evaluation” section). Information entropy closer to the ideal 8 bits/pixel, lower adjacent-pixel correlation in horizontal/vertical/diagonal directions, NPCR/UACI values consistently near ideal under one-pixel/plaintext perturbations, and stable NIST SP 800-22 pass rates across multiple images and runs are obtained, while competitive runtime is maintained. These results indicate that benefits beyond a simple concatenation of known modules are provided by the proposed synchronization-bound stream composition. The remainder of this article is organized as follows. “Preliminary ideas” section provides a summary of the preliminaries. “Methodology of the proposed TPM image encryption scheme” section provides details of the proposed methodology. “Performance analysis and evaluation” section presents the security analysis and numerical results. Finally, Conclusions section provides the conclusions and outlines directions for future work. Table 1 provides the various acronyms utilized in this article. Table 1List of acronyms utilized in this article.AcronymDefinitionAcronymDefinitionAEADAuthenticated Encryption with Associated DataAESAdvanced Encryption StandardAKEAuthenticated Key ExchangeAPIApplication Programming InterfaceBICBit Independence CriterionBPSKBinary Phase Shift KeyingCACellular Automaton/Cellular AutomataPCCPixel Cross Correlation CoefficientCPUCentral Processing UnitDAPDifferential Approximation ProbabilityDFTDiscrete Fourier TransformDNADeoxyribonucleic Acid(EC)DH(Elliptic-Curve) Diffie–HellmanEKBEgyptian Knowledge BankESMExponential Sine Map (as in 2D-ESM)FFTFast Fourier TransformFPGAField-Programmable Gate ArrayGAGenetic AlgorithmHMACHash-based Message Authentication CodeHSMHardware Security ModuleIAMIdentity and Access ManagementIoTInternet of ThingsKMSKey Management ServiceLALeft Almost (left almost semigroup)LAPLinear Approximation ProbabilityLDPCLow-Density Parity-Check (code)LFSRLinear Feedback Shift RegisterMACMessage Authentication CodeMAEMean Absolute ErrorMITMMan-in-the-Middle (attack)MTMersenne TwisterMSEMean Squared ErrorNISTNational Institute of Standards and TechnologyNLNonlinearityNPCRNumber of Pixels Change RatePCPersonal ComputerPRNGPseudo-Random Number GeneratorPSNRPeak Signal-to-Noise RatioRAMRandom Access MemoryRGBRed, Green, BlueSACStrict Avalanche CriterionSHA-2Secure Hash Algorithm 2 (family)SHA-256Secure Hash Algorithm 256-bitSHA-512Secure Hash Algorithm 512-bitSNRSignal-to-Noise Ratio (in PSNR)TEETrusted Execution EnvironmentTLSTransport Layer SecurityTPMTree Parity MachineUACIUnified Average Changing IntensityUAVUnmanned Aerial VehicleUSC-SIPIUniversity of Southern California — Signal and Image Processing InstituteVMVirtual MachineXORExclusive ORXNORExclusive NOR List of acronyms utilized in this article. Literature review The rapid growth of cloud-enabled multimedia services has spurred extensive research into image-specific cryptography that balances security, efficiency, and scalability. This literature review surveys key strands underpinning the proposed scheme: neural synchronization for key agreement via TPMs, pseudo-randomness sources including Mersenne Twister and cellular automata (notably Rule 30), DNA-inspired encoding and arithmetic for confusion/diffusion, and adaptive S-box construction assessed by standard cryptographic criteria. This literature review attempts to synthesize advances in each strand and highlight their limitations in cloud contexts, motivating the proposed multi-layer, TPM-driven scheme that diversifies entropy and strengthens resistance to statistical, linear, and differential attacks while remaining practical for real-time deployment. The work in24 proposes a color image encryption scheme that combines three layers: a sine chaotic map for key-driven bitwise diffusion, an S-box derived from a fractional-order 4D hyperchaotic Chen system to introduce strong nonlinear confusion, and a hybrid DNA coding stage that interleaves reversible DNA arithmetic and logic under pseudo-random control. The authors of25 propose an RGB image encryption scheme comprising three stages: a Rule 30 cellular automaton that generates a pseudo-random key for initial diffusion, a robust substitution box to enforce nonlinear confusion, and a Lorenz system-based key derived from a chaotic trajectory for a final diffusion layer. By combining CA-driven key-streams, an S-box built via transformation, modular inverses, and permutation, and a deterministic chaotic PRNG from the Lorenz system, the scheme targets strong confusion-diffusion properties while remaining lightweight and suitable for practical implementation. In26, the authors propose a two-layer image encryption and transmission framework tailored for UAV-assisted relay networks in contested environments. The first layer applies a Mersenne Twister-seeded Genetic Algorithm that splits bytes into crossover and mutation paths, using an MT-derived S-box and XOR masking, while the second layer employs DNA coding with reversible arithmetic under MT-driven keys. The encrypted bit-stream is then channel coded (convolutional or LDPC), BPSK-modulated, and relayed via multi-hop UAV clusters using decode-and-forward, with equal-gain combining at the destination. The authors of27 propose an image encryption scheme that integrates several discrete chaotic maps to achieve strong confusion and diffusion with minimal rounds. Their pipeline partitions RGB images into blocks, performs intra-block pixel shuffling via the 2D Hénon map, permutes blocks (rand-block operation), applies pixel-level distortion using the 1D Circle map, and finalizes diffusion with a bitwise XOR driven by the 2D Duffing map; decryption inverts these steps accordingly. Further, the authors of28 propose a color image cipher that integrates hyperchaotic scrambling, SHA-512-driven key derivation, dynamic DNA operations, and Zaslavskii-map-based conditional shifts. The pipeline: (1) derive initial conditions from the plain image’s SHA-512; (2) scramble pixels using a 2D hyperchaotic 2D-LICM map; (3) generate a cover image via a combined logistic-tent map and build a mask by randomly sampling bits from the cover image’s SHA-512; (4) perform dynamic, per-pixel DNA encoding, DNA-XOR, and decoding with rules selected by chaotic sequences; (5) apply row/column circular shifts controlled by Zaslavskii-map outputs; and (6) execute repeated XOR diffusion rounds whose count and seeds are SHA-dependent. While the authors of29 propose an image cipher that couples a novel algebraic confusion layer with chaos-driven diffusion. First, pixels are substituted via a substitution table constructed from an inverse left almost (LA) semigroup, introducing nonlinearity and breaking plaintext structure. Next, three logistic sequences are seeded from the Lorenz continuous chaotic system and applied per color layer (x→ R, y→ G, z→ B) through bitwise modulo-2 addition to diffuse changes across the image. Decryption inverts these steps. The authors of30 propose a hybrid image cipher that couples a new two-dimensional Exponential Sine Map (2D-ESM) with cellular automata to achieve layered confusion and diffusion. The 2D-ESM generates pseudo-random sequences highly sensitive to initial conditions (validated via bifurcation diagrams, Lyapunov exponents, and NIST SP 800-22 tests) which are mapped into per-pixel confusion and diffusion matrices. Encryption proceeds by mod-257 value transformation driven by the diffusion matrix, additive confusion via the confusion matrix, matrix transposition, and a CA-derived masking stage (e.g., Rule-30-based evolution), with an accompanying SHA-256 hash used for integrity verification. Decryption inverts CA masking, permutation, and modular operations using the inverse diffusion Moreover, the authors of31 propose a cellular-automata-driven image cipher that employs a hybrid one-dimensional CA configured with Rules 90 and 150 under null boundary conditions. Using a 24-cell array aligned with the 24 bits of an RGB pixel, the scheme treats the CA’s initial state (seed) as the symmetric key and encrypts/decrypts by XORing pixel components with the evolving CA state while advancing the CA via a unified update equation that merges the two rules. A rule pattern is selected to maximize cycle length (up to ), yielding pseudo-random key-streams for per-pixel processing. In32, the authors propose an image protection scheme that combines TPM-based neural key agreement with a modified Vigenère cipher. Two parties independently initialize TPMs and synchronize their weights over a public channel by exchanging only common random inputs and output bits; when synchronization occurs, the identical weight vectors serve as a shared secret key without ever transmitting the key itself. For payload encryption, a Vigenère cipher is adapted to images by operating modulo 256 and mitigating periodic-key artifacts: the key value is multiplied by the row index (y-axis) so each image row uses a distinct effective shift. Experiments show low Pearson correlation between plaintext and ciphertext (near zero for the modified cipher) and that TPM synchronization time depends on network size (K, N, L), similarity of initial weights, and the randomness of input vectors (attractive vs. repulsive steps). The work in33 introduces SLCA-Cipher, a lightweight image-encryption method aimed at IoT and other resource-limited devices. It builds encryption around 1D Cellular Automata Rule 90, where each cell updates via an XOR of its left and right neighbors, producing key-driven, pseudo-random evolution. The scheme converts a grayscale image to a binary grid, iteratively applies the CA updates to create strong scrambling and diffusion, and then converts the result back into an encrypted image. In summary, Table 2 shows that prior image encryption algorithms have individually leveraged chaos/CA-driven key-streams, DNA-based confusion, adaptive S-boxes, or TPM synchronization, but rarely combine them in a cohesive, end-to-end design. In particular: (i) schemes with strong confusion-diffusion via CA/chaos and DNA typically rely on static or plaintext-derived seeds, leaving key establishment outside the cipher boundary; (ii) TPM-based works demonstrate certificate-free key agreement yet pair it with lightweight substitution (e.g., Vigenère), not with modern nonlinearity-gated S-boxes and multilayer diffusion; and (iii) multi-source PRNG diversification with independently derived seeds is largely absent, which leaves systems exposed to PRNG-specific biases and distinguishing attacks. Moreover, few studies validate seed-dependent S-boxes against composite criteria (NL, SAC, BIC, LAP, DAP) while integrating them with DNA and dual PRNGs under a neural key-exchange front end suitable for cloud settings. This gap motivates the proposed algorithm: a TPM-synchronized, session-oriented key establishment that deterministically seeds two orthogonal PRNGs (MT and Rule 30 CA) and drives quality-gated, seed-dependent S-boxes interleaved with reversible DNA operations. Thereby unifying secure key agreement with diversified entropy sources and multi-stage confusion-diffusion tailored for cloud-scale, real-time image protection. Table 2Comparison of image encryption schemes by core components, randomness sources, confusion, and diffusion mechanisms.ReferencesCore building blocksKey/PRNG sourceConfusion mechanismDiffusion mechanism24Sine chaotic map; 4D hyperchaotic Chen (fractional-order) S-box; Hybrid DNA codingChaotic maps (sine; hyperchaos)Nonlinear S-box (Chen-based); DNA ops (dynamic rules)Bitwise masking via chaotic key-stream; DNA arithmetic/logic25Rule-30 CA key-stream; Algebraic S-box; Lorenz-system keyCA (Rule 30); Lorenz chaotic trajectoryRobust S-box (transform + inverses + permutation)XOR/diffusion via CA and Lorenz PRNGs26MT-seeded Genetic Algorithm + S-box; DNA layer; channel codingMersenne TwisterGA crossover path + MT S-boxXOR masking; DNA addition; coded transmission27Hénon (2D), Circle (1D), Duffing (2D) mapsChaotic mapsIntra-block shuffling; Block permutationPixel-level distortion; final XOR via Duffing28Hyperchaotic 2D-LICM scramble; Combined logistic-tent; Zaslavskii shifts; Dynamic DNA; SHA-512SHA-512 from plaintext; Logistic-tent chaosDynamic DNA (per-pixel rules); Row/column shifts (Zaslavskii)Repeated XOR rounds (SHA-dependent)29Inverse LA-semigroup S-box; Lorenz-seeded logistic streamsLorenz → per-channel logistic sequencesAlgebraic substitution (LA-semigroup table)Bitwise mod-2 addition per RGB (x→ R, y→ G, z→ B)302D Exponential Sine Map (2D-ESM); CA mask; Matrix transpose2D-ESM chaos (bifurcation, Lyapunov, NIST-validated)Per-pixel confusion matrix; CA maskMod-257 diffusion matrix; inverse ops on decrypt311D CA hybrid (Rules 90/150, null boundary)CA seed (24-cell, long cycle)XOR with evolving CA state (per-pixel, 24-bit alignment)Key-stream evolution by CA update32Tree Parity Machine key agreement; Modified Vigenère (mod-256)TPM-synchronized weightsVigenère with row-scaled key (break periodicity)Row-wise shift (mod-256) based diffusion331D Cellular Automata (Rule 90); binary image grid; iterative round-based transformSecret seed/key → CA initialization; CA evolution acts as key-stream/key-grid generatorKey-dependent scrambling via iterative CA evolution (noise-like ciphertext appearance)Iterative XOR-based neighbor update (Rule 90) yielding strong bit/pixel diffusion across rounds Comparison of image encryption schemes by core components, randomness sources, confusion, and diffusion mechanisms. Preliminary ideas Tree parity machines Tree Parity Machines are a type of neural network architecture used in machine learning, particularly in the field of cryptography for key exchange over a public channel13. They were introduced by Apostolico and Giancarlo in 1990. A Tree Parity Machine is a type of feedforward neural network with three layers: an input layer, a hidden layer, and an output layer. The input and output layers consist of binary values, while the hidden layer consists of neurons with continuous weights. The unique property of TPMs is that two or more TPMs can be synchronized over a public channel. This is done by repeatedly sending random input vectors to the TPMs and updating their weights according to a learning rule. Over time, the weights of the TPMs converge, effectively synchronizing them. This property makes TPMs useful for secure key exchange: once the TPMs are synchronized, their weights can be used as a shared secret key. Tree Parity Machines are robust to various types of attacks, including geometric and flipping attacks. They have been used in several cryptographic systems and have also been used to model biological processes, such as the synchronization of fireflies34. In the implemented TPM, the adopted parameter values are where, according to Algorithm 1, N denotes the number of hidden neurons, K denotes the number of input neurons connected to each hidden neuron, and L denotes the range of each weight, i.e., These values are selected to provide a practical balance between security strength and synchronization efficiency. Since the TPM contains N× K trainable weights, the above choice yields weights in the synchronized weight matrix. In addition, each weight can take 2L+1=21 possible values. Therefore, the weight-space size of the TPM alone is which indicates a very large search space and thus strengthens resistance against brute-force recovery and passive attacker synchronization attempts. The steps of the synchronization process are outlined as follows: The size of the TPM is chosen by the two parameters K and N (input layer and hidden layer, respectively). The size of the TPM is chosen by the two parameters K and N (input layer and hidden layer, respectively). Random input vectors of size n are chosen and sent to both TPMs. Random input vectors of size n are chosen and sent to both TPMs. Each TPM computes an output value based on its current weights and the input vector using Algorithm 1. Each TPM computes an output value based on its current weights and the input vector using Algorithm 1. The TPMs exchange their output values. If the outputs match, both TPMs modify their weights according to the input vector by the Hebbian rule, as in Algorithm 2. If the outputs do not match, no changes are made. The TPMs exchange their output values. If the outputs match, both TPMs modify their weights according to the input vector by the Hebbian rule, as in Algorithm 2. If the outputs do not match, no changes are made. This process is repeated until the weights of the TPMs match, meaning they are synchronized. This process is repeated until the weights of the TPMs match, meaning they are synchronized. The influence of the three parameters can be summarized as follows. Increasing N increases the number of hidden neurons, while increasing K increases the number of inputs associated with each hidden neuron. In both cases, the total number of weights N× K grows, which enlarges the TPM state space and increases the difficulty of inferring the synchronized weight vector from the exchanged public information. Increasing L enlarges the number of admissible values of each weight and therefore further expands the search space. However, larger values of N, K, and L also tend to increase the synchronization time, because the two communicating TPMs must converge in a higher-dimensional weight space and over a wider weight interval. For this reason, (K, N, L) are treated in this work as security parameters that directly affect both the resistance to known TPM attacks and the convergence behavior of the legitimate parties. To quantify this trade-off, synchronization experiments were conducted using the Hebbian update rule with the above parameter setting. Over 20 independent synchronization trials, the number of iterations required to reach identical weights ranged from 508 to 1139, with a mean of 763, a median of 738, and a standard deviation of ± 132. Since each synchronization iteration corresponds only to the exchange of the TPM output τ , this overhead remains small and is incurred only once during session establishment. Hence, the adopted setting (N,K,L)=(100,10,10) is selected as a suitable compromise: it provides a very large TPM weight space while maintaining an acceptable synchronization cost for the intended cloud image-encryption scenario. Tree Parity Machine, as adopted from35. To further evaluate the practicality of the TPM stage for real-time cloud applications, the synchronization cost is measured for the same TPM configuration adopted in this work, namely (N,K,L)=(100,10,10), using the Hebbian update rule. Over 20 independent synchronization trials, the number of iterations required to reach identical weights ranged from 508 to 1139, with a mean of 763, a median of 738, and a standard deviation of ± 132. These results indicate that the synchronization overhead remains limited in practice, since each iteration requires only the exchange of the TPM output τ over the public channel. Moreover, synchronization is performed only once during session establishment, after which the synchronized weight vectors are used to derive the keys for the subsequent encryption stages. Therefore, the TPM synchronization cost is considered acceptable for the intended real-time cloud image-transmission scenario. Hebbian rule adapted from35 Mersenne twister The Mersenne Twister (MT) is a widely used pseudo-random number generator introduced by Makoto Matsumoto and Takuji Nishimura in 1997. It produces sequences of 32-bit integers using a linear recurrence (often described in terms of LFSR-like operations) together with a tempering function that improves the distribution of the generated values36. In an LFSR, the register contents are shifted and selected bits are combined using exclusive-OR (XOR) operations to generate subsequent bits; similarly, the MT updates an internal state of 624 32-bit words and then applies tempering before output. The MT is based on a large Mersenne prime of the form , where p is also prime. The commonly used MT19937 variant is designed to have a very long period of , i.e., the maximum number of values that can be generated before the sequence repeats37. While this long period and the tempering step provide strong statistical behavior, it is important to note that MT is not cryptographically secure by design: due to its linear structure, if a sufficiently long segment of MT output is exposed, an attacker can potentially reconstruct the internal state and predict future outputs. Therefore, MT should not be used as a stand-alone key-stream generator in adversarial settings. In the proposed scheme, the MT is used only as a supporting randomness source within a layered construction rather than as an independent security primitive. Specifically, the MT is deterministically seeded from secret material (derived from the synchronization process) and is not seeded with attacker-controlled or low-entropy values; moreover, its output is not relied upon alone but is combined with other nonlinear and diffusion stages in the overall pipeline. This design choice reduces the practical risk associated with MT’s non-cryptographic nature, but it is explicitly acknowledged that statistical strength and long period do not imply cryptographic security. For high-assurance deployments, MT can be replaced with a standard CSPRNG (e.g., AES-CTR or ChaCha20) without changing the architecture of the proposed method38. In Fig. 1, a seed of value 4567 is given to the MT and the output is plotted as a 2D array of bits of size 80× 80. Array plot for Mersenne Twister with a seed 4567 of size 80× 80. DNA coding DNA sequences consist of four deoxyribonucleic acids: A (adenine), T (thymine), C (cytosine), and G (guanine). These nucleotides form complementary pairs, with A pairing with T and C pairing with G. When using DNA sequences for binary numbers, 0 and 1 are complementary. Image encryption using DNA coding is a technique that utilizes the complexity and randomness of DNA sequences to encrypt digital images. The process involves converting the image into a binary format and breaking it down into small blocks of data. Each block is assigned a corresponding DNA sequence using a DNA coding technique, which is generated randomly using a random number or pseudo-random number generator24. In such a case, each block is basically a base-4 number39. To assign DNA sequences to binary values of an image, the 8-bit gray values are split into pairs of 00, 01, 10, 11, and assigned to the DNA base pairs according to a specific rule. There are 24 possible permutations, but only 8 are possible and are displayed in Table 3. The first rule assigns In addition to DNA rules, reversible DNA operations, such as addition and subtraction, which reverse each other, and XOR or XNOR, are used for encryption. These operations are carried out in accordance with a specific table, as shown in Table 4. A visual representation of a DNA strand plot is shown in Fig. 2. Table 3Permutations of DNA to bits assignment.Rule12345678A0000111001100111T1111000110011000G1001101100001101C0110010011110010 Permutations of DNA to bits assignment. Table 4Arithmetic and logic operations to be performed on DNA {Addition, Subtraction, XOR, XNOR}.ATCGA{A,A,A,G}{T,G,T,C}{C,C,C,T}{G,T,G,A}T{T,T,T,C}{C,A,A,G}{G,G,G,A}{A,C,C,T}C{C,C,C,T}{G,T,G,A}{A,A,A,G}{T,G,T,C}G{G,G,G,A}{A,C,C,T}{T,T,T,C}{C,A,A,G} Arithmetic and logic operations to be performed on DNA {Addition, Subtraction, XOR, XNOR}. An example DNA strand. The reversibility of the proposed DNA-based transformation follows from two facts. First, each DNA encoding rule in Table 3 defines a bijection between the four binary pairs and the four nucleotides , which guarantees unique encoding and decoding. Second, the DNA arithmetic table in Table 4 is constructed so that subtraction is the inverse operation of addition for every ordered nucleotide pair. Therefore, for any DNA symbols , the operation admits the unique inverse For example, from Table 4, A + G = G. Applying the inverse operation gives G - G = A, which recovers the original symbol exactly. Similarly, T + C = G and G - C = T. This confirms the perfect reversibility of the adopted DNA arithmetic. In the proposed algorithm, dynamic DNA coding is carried out, in such a manner that depending on the image dimensions, a DNA coding rule is applied, as shown in Table 5. Table 5DNA coding rule to apply depending on image dimensions.Image dimensionsRule to apply16 × 16132 × 32264 × 643128 × 1284256 × 2565512 × 51261024 × 102472048 × 20488 DNA coding rule to apply depending on image dimensions. Thus, the DNA addition/subtraction stage is lossless and fully reversible, ensuring exact recovery of the original encoded sequence during decryption. In the same manner, the DNA XOR and DNA XNOR operations are reversible under the adopted rule table because each ordered input pair produces a unique output symbol. Therefore, once the operand and the encoding rule are known, the original symbol can be uniquely retrieved during decryption by applying the corresponding inverse table lookup. Hence, the DNA addition, subtraction, XOR, and XNOR stages used in the proposed method are all lossless. Cellular automata Cellular automata are structures made up of cells arranged in a grid that follow simple rules to produce patterns. Each cell in a two-dimensional grid has a binary state of either 0 or 1, which is determined by its neighboring cells based on a set of rules25. The Rule 30 cellular automaton is used in the encryption process, providing a formula for determining the next state of each cell. The most significant property of cellular automata is their ability to generate complex patterns using simple mathematical rules. These patterns are useful for scrambling and encrypting image data, rendering it unreadable without the proper decryption key40. The formula for determining the subsequent state of a cell is as follows: represents the current state of the cell i at time t, and represents its next state at time t+1. The ⊕ symbol represents the exclusive OR (XOR) operation, which returns a 1 if the two inputs are different, and a 0 if they are the same. The first 15 iterations of the Rule 30 CA are demonstrated in Fig. 3 can be considered as a PRNG, as the center column satisfies the characteristics of a randomly generated bit-stream41. Specifically, the center column of Fig. 3 reveals that the resulting bit-stream is (1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1). Rule 30 is adopted in this work because it provides a practical balance between implementation simplicity, computational efficiency, and strong pseudo-random behavior. In comparison with many other elementary cellular automata rules that generate regular, symmetric, or more predictable patterns, Rule 30 is well known for producing highly irregular and chaotic-looking sequences even from simple initial conditions. This property makes it particularly suitable for image encryption, where lightweight generation of complex bit-streams is required to enhance confusion and diffusion42. Nevertheless, Rule 30 is deterministic and is not claimed here as a standalone cryptographically secure pseudo-random generator. Its randomness quality may vary depending on the selected output cell and extraction strategy, and therefore the security of the proposed scheme does not rely solely on Rule 30. Instead, Rule 30 is employed as an auxiliary randomness-enhancing component within the overall hybrid encryption framework. The initial 15 steps of the Rule 30 Cellular automaton. Methodology of the proposed TPM image encryption scheme Encryption scheme In this section, the proposed image encryption scheme is implemented in a number of steps, as follows: First Encryption Layer: An image of appropriate dimensions M× N is chosen and its pixels are converted into a 1D bit-stream, .An initial weight vector is chosen for synchronization between the sender and the receiver to get finalWeightVector1.The finalWeightVector1 is given as an input to the hash function (SHA-512) to generate the seed : 5 is given as a seed to MT to generate an encryption key . 6 is XOR-ed with to generate the bit-stream : 7Every eight bits of are grouped together, forming an array of integers which ranges from 0 to 255. is then used to generate using the MT and Algorithm 3, with the desired threshold: 8 is applied to to generate the encrypted image with bit-stream : 910 First Encryption Layer: An image of appropriate dimensions M× N is chosen and its pixels are converted into a 1D bit-stream, .An initial weight vector is chosen for synchronization between the sender and the receiver to get finalWeightVector1.The finalWeightVector1 is given as an input to the hash function (SHA-512) to generate the seed : 5 is given as a seed to MT to generate an encryption key . 6 is XOR-ed with to generate the bit-stream : 7Every eight bits of are grouped together, forming an array of integers which ranges from 0 to 255. is then used to generate using the MT and Algorithm 3, with the desired threshold: 8 is applied to to generate the encrypted image with bit-stream : 910 An image of appropriate dimensions M× N is chosen and its pixels are converted into a 1D bit-stream, . An image of appropriate dimensions M× N is chosen and its pixels are converted into a 1D bit-stream, . An initial weight vector is chosen for synchronization between the sender and the receiver to get finalWeightVector1. An initial weight vector is chosen for synchronization between the sender and the receiver to get finalWeightVector1. The finalWeightVector1 is given as an input to the hash function (SHA-512) to generate the seed : 5 The finalWeightVector1 is given as an input to the hash function (SHA-512) to generate the seed : 5 is given as a seed to MT to generate an encryption key . 6 is given as a seed to MT to generate an encryption key . 6 is XOR-ed with to generate the bit-stream : 7 is XOR-ed with to generate the bit-stream : 7 Every eight bits of are grouped together, forming an array of integers which ranges from 0 to 255. Every eight bits of are grouped together, forming an array of integers which ranges from 0 to 255. is then used to generate using the MT and Algorithm 3, with the desired threshold: 8 is then used to generate using the MT and Algorithm 3, with the desired threshold: 8 is applied to to generate the encrypted image with bit-stream : 910 is applied to to generate the encrypted image with bit-stream : 910 Second Encryption Layer: Key is given as a seed to the MT to create the second key , then it is converted to DNA to get : 1112The image bits are also converted to DNA to generate . 13DNA addition is preformed between and giving DNA of which formulates an encrypted image : 14 Second Encryption Layer: Key is given as a seed to the MT to create the second key , then it is converted to DNA to get : 1112The image bits are also converted to DNA to generate . 13DNA addition is preformed between and giving DNA of which formulates an encrypted image : 14 Key is given as a seed to the MT to create the second key , then it is converted to DNA to get : 1112 Key is given as a seed to the MT to create the second key , then it is converted to DNA to get : 1112 The image bits are also converted to DNA to generate . 13 The image bits are also converted to DNA to generate . 13 DNA addition is preformed between and giving DNA of which formulates an encrypted image : 14 DNA addition is preformed between and giving DNA of which formulates an encrypted image : 14 Third Encryption Layer: The finalWeightVector2 is given as an input to the hash function (SHA-512) to generate the seed : 15 is given as a seed to Rule30CA to get an encryption key . 16Every eight bits of are grouped together to form an array of integers which ranges from 0 to 255. is used to generate using Rule30CA and Algorithm 3, with the desired threshold: 17 is then mapped into bits as and then XOR-ed with to generate the bit-stream : 18 is applied on to generate the final encrypted image I': 19 Third Encryption Layer: The finalWeightVector2 is given as an input to the hash function (SHA-512) to generate the seed : 15 is given as a seed to Rule30CA to get an encryption key . 16Every eight bits of are grouped together to form an array of integers which ranges from 0 to 255. is used to generate using Rule30CA and Algorithm 3, with the desired threshold: 17 is then mapped into bits as and then XOR-ed with to generate the bit-stream : 18 is applied on to generate the final encrypted image I': 19 The finalWeightVector2 is given as an input to the hash function (SHA-512) to generate the seed : 15 The finalWeightVector2 is given as an input to the hash function (SHA-512) to generate the seed : 15 is given as a seed to Rule30CA to get an encryption key . 16 is given as a seed to Rule30CA to get an encryption key . 16 Every eight bits of are grouped together to form an array of integers which ranges from 0 to 255. Every eight bits of are grouped together to form an array of integers which ranges from 0 to 255. is used to generate using Rule30CA and Algorithm 3, with the desired threshold: 17 is used to generate using Rule30CA and Algorithm 3, with the desired threshold: 17 is then mapped into bits as and then XOR-ed with to generate the bit-stream : 18 is then mapped into bits as and then XOR-ed with to generate the bit-stream : 18 is applied on to generate the final encrypted image I': 19 is applied on to generate the final encrypted image I': 19 S-box Generation. A visual representation for the encryption scheme as a flow chart is provided in Fig. 4 (Tables 6 and 7). A flow chart demonstrating the 3-level encryption process. Table 6S-box 1 generated from MT .1752196832321086019413715652278954249441136224201166132721136117247233561231621285202115791671091602411921543021870872402962138285120172373912910017458722381131723413198772515949119844223242163321315323042114351341121441961561779122253140978144231179885012420320412021861117146107141130190189513926763412112747248741416114624625210149237197105511731062224378191185243187104805914524918025511515245215217866479158236122184171206181245176239939816538188209662501256923531827525463169189251213220153128168406112441501931642121627011690195214103148338317014348207521995522696671101826110120099208135225151571831262228205118231917814715573142210133221216229102928 S-box 1 generated from MT . Table 7S-box 2 generated from Rule30 CA .1063211022416170186182104517270231621171091811979914298108158221955323421412087720324750128137229103831871618721612486392815246311767416816071666549204165792317411711021772305715618323523911232182091902201271552620217918917512914721404720023224225121297159237114352252052537322317827122523481586125153240254170149604611621120143932481110194162148209822411367138208361962412284219126157134762171331214518540227192062451251154213519044172856319841808818821524416324313616412131145623614148207927829111255119169192252751023819122615013661392138019933132212221941424922830233100144118184371955566938711511731075489250411864143910515421055681301931465915212316796 S-box 2 generated from Rule30 CA . Decryption scheme The decryption scheme is implemented in a reverse manner of the encryption scheme as follows: First Decryption Layer: The encrypted image I' is converted into a bit-stream : 20FinalWeightVector2 is given to the hash function (SHA-512) to create the seed : 21 is given as seed to Rule30CA to generate : 22Every eight bits of are grouped together to form an array of integers ranging from 0 to 255. is then used to generate the S-box using Rule30CA and Algorithm 3, with the desired threshold: 23 is applied to then XOR-ed with to create the first decrypted image : 24 First Decryption Layer: The encrypted image I' is converted into a bit-stream : 20FinalWeightVector2 is given to the hash function (SHA-512) to create the seed : 21 is given as seed to Rule30CA to generate : 22Every eight bits of are grouped together to form an array of integers ranging from 0 to 255. is then used to generate the S-box using Rule30CA and Algorithm 3, with the desired threshold: 23 is applied to then XOR-ed with to create the first decrypted image : 24 The encrypted image I' is converted into a bit-stream : 20 The encrypted image I' is converted into a bit-stream : 20 FinalWeightVector2 is given to the hash function (SHA-512) to create the seed : 21 FinalWeightVector2 is given to the hash function (SHA-512) to create the seed : 21 is given as seed to Rule30CA to generate : 22 is given as seed to Rule30CA to generate : 22 Every eight bits of are grouped together to form an array of integers ranging from 0 to 255. Every eight bits of are grouped together to form an array of integers ranging from 0 to 255. is then used to generate the S-box using Rule30CA and Algorithm 3, with the desired threshold: 23 is then used to generate the S-box using Rule30CA and Algorithm 3, with the desired threshold: 23 is applied to then XOR-ed with to create the first decrypted image : 24 is applied to then XOR-ed with to create the first decrypted image : 24 Second Decryption Layer: is a given as a seed to MT to create and then converted to DNA to get : 2526 is converted into DNA. Then DNA subtraction is performed between and . The result is then restored into bits to generate the second decrypted image in bit-stream . 2728 Second Decryption Layer: is a given as a seed to MT to create and then converted to DNA to get : 2526 is converted into DNA. Then DNA subtraction is performed between and . The result is then restored into bits to generate the second decrypted image in bit-stream . 2728 is a given as a seed to MT to create and then converted to DNA to get : 2526 is a given as a seed to MT to create and then converted to DNA to get : 2526 is converted into DNA. Then DNA subtraction is performed between and . The result is then restored into bits to generate the second decrypted image in bit-stream . 2728 is converted into DNA. Then DNA subtraction is performed between and . The result is then restored into bits to generate the second decrypted image in bit-stream . 2728 Third Decryption Layer: FinalWeightVector1 is given to the hash function (SHA-512) to create the seed : 29 is then used to generate the S-box using MT and Algorithm 3 with the desired threshold: 30Reverse is applied on the bit-stream . Then the result is XOR-ed with to generate the final decrypted Image I: 31 Third Decryption Layer: FinalWeightVector1 is given to the hash function (SHA-512) to create the seed : 29 is then used to generate the S-box using MT and Algorithm 3 with the desired threshold: 30Reverse is applied on the bit-stream . Then the result is XOR-ed with to generate the final decrypted Image I: 31 FinalWeightVector1 is given to the hash function (SHA-512) to create the seed : 29 FinalWeightVector1 is given to the hash function (SHA-512) to create the seed : 29 is then used to generate the S-box using MT and Algorithm 3 with the desired threshold: 30 is then used to generate the S-box using MT and Algorithm 3 with the desired threshold: 30 Reverse is applied on the bit-stream . Then the result is XOR-ed with to generate the final decrypted Image I: 31 Reverse is applied on the bit-stream . Then the result is XOR-ed with to generate the final decrypted Image I: 31 A visual representation for the decryption scheme as a flow chart is provided in Fig. 5. A flow chart demonstrating the 3-level decryption process. Key confirmation/authentication After both communicating parties complete TPM synchronization and derive the session key material, a key-confirmation step is performed by exchanging an authentication tag (e.g., HMAC-SHA-512) computed over a hash of the synchronization transcript. If verification fails, the session is aborted. This step prevents MITM attacks by ensuring both endpoints derived the same key and that the transcript is not modified. Performance analysis and evaluation This section includes a full analysis of the proposed encryption scheme based on widely known metrics summarized in Table 8. The utilized PC has the following specifications: 2.7 GHz Intel® CoreTM i7, 8 GB. All images in use are sourced from the USC-SIPI image database43, and resized to 256× 256 unless otherwise specified. The following metrics are computed: Mean squared error (MSE): A large MSE between the original and encrypted images is preferred, as it reflects substantial distortion introduced by the encryption algorithm. Mean squared error (MSE): A large MSE between the original and encrypted images is preferred, as it reflects substantial distortion introduced by the encryption algorithm. Peak signal-to-noise ratio (PSNR): A low PSNR value between the original and encrypted images is desirable, signifying minimal similarity and therefore stronger encryption resistance. Peak signal-to-noise ratio (PSNR): A low PSNR value between the original and encrypted images is desirable, signifying minimal similarity and therefore stronger encryption resistance. Mean absolute error (MAE): Higher MAE values indicate significant differences in pixel intensities caused by encryption, which is a desirable characteristic of a secure encryption scheme. Mean absolute error (MAE): Higher MAE values indicate significant differences in pixel intensities caused by encryption, which is a desirable characteristic of a secure encryption scheme. Entropy: Entropy quantifies the level of randomness in an image. Global entropy measures the overall distribution of pixel intensities, while local entropy evaluates complexity within small neighborhoods 44. For encrypted images, high global entropy values (close to 8 for 8-bit grayscale images) indicate strong randomness and uniform pixel distribution. Entropy: Entropy quantifies the level of randomness in an image. Global entropy measures the overall distribution of pixel intensities, while local entropy evaluates complexity within small neighborhoods 44. For encrypted images, high global entropy values (close to 8 for 8-bit grayscale images) indicate strong randomness and uniform pixel distribution. Discrete fourier transform (DFT): After encryption, the frequency spectrum of the image should appear flat and noise-like, without any visible peaks or patterns, indicating the absence of exploitable frequency information. Discrete fourier transform (DFT): After encryption, the frequency spectrum of the image should appear flat and noise-like, without any visible peaks or patterns, indicating the absence of exploitable frequency information. Pixel correlation coefficient (PCC): A secure encryption scheme produces encrypted images with correlation coefficients close to zero between adjacent pixels, demonstrating the removal of spatial dependencies. Pixel correlation coefficient (PCC): A secure encryption scheme produces encrypted images with correlation coefficients close to zero between adjacent pixels, demonstrating the removal of spatial dependencies. Number of pixels change rate (NPCR): High NPCR values (typically above 99%) indicate strong sensitivity to small changes in the plaintext image, making the algorithm resistant to differential attacks. Number of pixels change rate (NPCR): High NPCR values (typically above 99%) indicate strong sensitivity to small changes in the plaintext image, making the algorithm resistant to differential attacks. Unified average changing intensity (UACI): For grayscale images, ideal UACI values are around 33.35%, reflecting substantial average intensity variations between two encrypted outputs generated from slightly different plaintexts. Unified average changing intensity (UACI): For grayscale images, ideal UACI values are around 33.35%, reflecting substantial average intensity variations between two encrypted outputs generated from slightly different plaintexts. Table 8Mathematical formulations of the performance metrics employed for assessing image encryption.MetricDescriptive equation(s)MSEPSNRMAEEntropyDFTPCC where NPCR where UACI Mathematical formulations of the performance metrics employed for assessing image encryption. Visual and histogram analyses Histogram analysis is a technique used in image processing and analysis to examine the distribution of pixel values in an image. This technique involves plotting the frequency of each pixel value in the image and analyzing the resulting histogram. In image encryption, histogram analysis is used as a metric to evaluate the effectiveness of the encryption algorithm by comparing the histogram of the original image with the histogram of the encrypted image. Figures 6 and 7 display the plain and encrypted versions of different images. Also, Figs. 8 and 9 display their respective histogram plots. By comparing the histogram plots of the plain and encrypted versions of the images, one can observe any changes in the distribution of pixel values caused by the encryption process. Encryption algorithms are designed to randomize the pixel values in an image, so the histogram plot of the encrypted image shows a more uniform distribution of pixel intensities compared to the plain image. Plain images. Encrypted images. Plain images histograms. Encrypted images histograms. Statistical analyses The results presented in Table 9 demonstrate the strong performance of the proposed image encryption approach across multiple statistical metrics. The elevated MSE and reduced PSNR values confirm that the encryption process introduces substantial alterations, which is an essential characteristic for secure encryption. The MAE results further validate the presence of considerable pixel-level changes. Additionally, the entropy measurements reveal that the encrypted images possess high randomness approaching the ideal value of 8, reflecting strong confusion and diffusion properties. Overall, these metrics collectively affirm the robustness and reliability of the proposed algorithm in protecting image data. Table 9Evaluation of the proposed scheme’s performance.ImageMSEPSNR [dB]MAEEntropyNPCR [%]UACI [%]Peppers10140.48.0702482.33717.9989499.596232.2891Mandrill8291.118.9446875.04957.9989399.613429.4312Tree9952.08.151781.52447.9991499.612931.9704House8315.58.9319275.08477.9989599.610929.445Average9174.75258.5246478.498937.9989999.6083530.78393 Evaluation of the proposed scheme’s performance. Table 10 presents a comparison of the Pixel Correlation Coefficient (PCC) values for both plain and encrypted images in three directions: vertical (V), horizontal (H), and diagonal (D). The plain images exhibit high correlation values, with average PCCs of 0.91712400, 0.93759150 and 0.89062200 for the three orientations, reflecting the typical structural redundancy found in natural images. In contrast, the encrypted images show near-zero correlation, with average PCCs of -0.00215014, 0.00057989 and -0.00287457 for the same directions. These results indicate that the proposed encryption method effectively disrupts pixel dependencies, introducing randomness. The analysis is further supported by the 3D PCC plots in Fig. 10, which display the correlation in all three directions for both the plain and encrypted versions of the Peppers image. Table 10Correlation coefficients of plain and encrypted images.Plain imageEncrypted imageImageVerticalHorizontalDiagonalVerticalHorizontalDiagonalPeppers0.966795000.959422000.93042600-0.002791410.00194988-0.00027927Mandrill0.790880000.848778000.75062400-0.004825790.00153100-0.00717397Tree0.945150000.968153000.92996700-0.005950650.00028251-0.00118117House0.9529260.9782320.9360440.0008753710.001119760.00546522Average0.913937750.938646250.88676525-0.003173120.00122079-0.00079230 Correlation coefficients of plain and encrypted images. 3D Correlation coefficient diagram of the plain and encrypted red channel of House image. These findings validate the algorithm’s effectiveness in enhancing image security by removing the correlations typically found in plain images. Differential attack analysis A way to evaluate the effectiveness of an encryption method against differential attacks is by using a differential attack analysis. This analysis can involve two metrics: NPCR and UACI. These methods are used to evaluate the encryption scheme’s ability to withstand differential attacks. Table 9 presents estimated values for NPCR and UACI for several encrypted images, As shown, all achieved NPCR values are above 99% , while the UACI is also around the value 33%. As a result, any slight difference in the plaintext image would result in a significant difference in the encrypted image. The average NPCR and UACI values of the proposed scheme, as shown in Table 9, are 99.60897% and 32.26675%, respectively. Further attacks The security of the proposed encryption scheme is also evaluated against additional classical cryptanalytic attack models. In the proposed method, the secret key material is generated from the synchronized final weight vectors through SHA-512, Mersenne Twister (MT), and Rule30CA, rather than being derived from the plaintext image itself. Moreover, the encryption process is carried out through multiple successive key-dependent stages, including XOR masking, dynamically generated S-box substitution, DNA encoding, DNA addition, and Rule30CA-based transformation. This multi-layer structure reduces the possibility of exploiting direct relationships between plaintexts and ciphertexts and enhances the robustness of the scheme against several attack scenarios. Known-plaintext attack & known-ciphertext attack Known-Plaintext Attack (KPA): In a known-plaintext attack, the adversary has access to one or more plaintext images and their corresponding ciphertexts and attempts to recover the secret key or infer the encryption procedure. The proposed scheme resists this attack because the keys , , are generated from the synchronized final weight vectors using SHA-512, MT, and Rule30CA, and thus remain independent of the plaintext image. In addition, the plaintext is processed through several key-dependent operations, including XOR with , substitution using S-box 1, DNA addition with , XOR with , and substitution using S-box 2. Therefore, knowledge of plaintext-ciphertext pairs alone does not provide sufficient information to reconstruct the secret parameters or recover the encryption keys. Known-Ciphertext Attack (KCA): In a known-ciphertext attack, the attacker has access only to the encrypted images and attempts to recover the original plaintext without any prior knowledge of the secret keys. This attack remains ineffective against the proposed scheme because the ciphertext is produced by multiple nonlinear and key-controlled transformations applied in sequence. Without the secret key material required to generate , , , S-box 1, and S-box 2, the attacker cannot correctly reverse the XOR stages, regenerate the substitution boxes, or invert the DNA addition process. Hence, ciphertext-only observations are insufficient to reveal the original image content. Chosen-plaintext attack & chosen-ciphertext attack Chosen-plaintext attack (CPA): In a chosen-plaintext attack, the adversary is allowed to select arbitrary input images and obtain their corresponding ciphertexts in an attempt to discover exploitable plaintext-ciphertext relations or derive the secret key. The proposed scheme shows resistance to this attack because the internal key-generation process is controlled by the synchronized final weight vectors and not by the chosen plaintext itself. More specifically, SHA-512, MT, and Rule30CA are used to generate the secret keys independently of the image content. Furthermore, the plaintext undergoes several successive key-dependent and nonlinear transformations, namely XOR masking, S-box substitution, DNA encoding and addition, and a final Rule30CA-based layer. As a result, even carefully designed plaintexts do not enable the attacker to isolate the secret parameters or recover the internal keys in a practical manner. Chosen-ciphertext attack (CCA): In a chosen-ciphertext attack, the adversary attempts to decrypt selected ciphertexts in order to obtain useful information about the plaintext or the secret key. The proposed scheme is resistant to this attack because successful decryption requires the same secret parameters used during encryption to regenerate the correct keys and substitution boxes. In the absence of these parameters, arbitrary ciphertexts cannot be meaningfully reversed through the XOR, S-box, and DNA-based stages. Consequently, chosen-ciphertext queries do not provide practical information that can be used to recover the original plaintext or infer the secret key structure. Key sensitivity analysis Key sensitivity is an important security requirement for image encryption schemes, where a very small change in the key should produce a completely different cipher image and should prevent successful decryption. In the proposed scheme, the encryption keys are derived from the final synchronized TPM weight vectors through SHA-512, and are then used to generate , , , and the corresponding S-boxes. Therefore, to evaluate key sensitivity, one element of the final TPM weight vector is slightly modified while all other key parameters remain unchanged. Let the correct key be denoted by and the slightly modified key by , where Decryption using fails to recover the original image and produces an unintelligible output, as shown in Fig. 11. This is because even a one-unit change in the TPM weight vector leads to a completely different SHA-512 output, which consequently changes the generated keys and S-boxes. Hence, the proposed scheme demonstrates strong sensitivity to the initial secret keys and is resistant to brute-force and key-guessing attacks. Key sensitivity visual analysis showing failed decryption using slightly changed key. Execution time & computational complexity analyses To determine the suitability of the proposed algorithm for real-time applications, an analysis of its encryption rate is conducted. The results are due to applying the encryption scheme on different images of dimensions 256 × 256. As shown in Table 11 the proposed scheme takes 0.85846 s to encrypt an image. This translates to an encryption rate of 1.8 Mbps. The computational complexity of the proposed encryption scheme is linear with respect to the image size. Let the input image dimensions be M × N. The main operations in the three encryption layers, including bit-stream conversion, key-stream generation, XOR operations, DNA conversion, DNA addition, and S-box substitution, are all performed by scanning the image data once for a constant number of times. Therefore, the overall time complexity of the proposed scheme is O(M× N). Table 11Execution time comparison for various schemes of the Lena image having dimensions 256× 256.SchemeEncryption time [s]Machine specificationsComputational[s](CPU and RAM)ComplexityProposed scheme0.858462.7 GHz Intel® CoreTM i7, 8 GBO(M× N)252.5823892.9 GHz Intel® CoreTM i9, 32 GBO(M× N)451.425452.9 GHz Intel® CoreTM i9, 32 GBO(M× N)461.11683.4 GHz Intel® CoreTM i7, 8 GBO(M× N) Execution time comparison for various schemes of the Lena image having dimensions 256× 256. Key space analysis The key space of the proposed encryption scheme is determined by the number of possible values of its independent secret inputs. In the proposed method, the main secret material is represented by the TPM final weight vectors used to generate the seeds and . In contrast, the internal values , , and are not counted as additional independent keys, since they are deterministically derived from the TPM secret material through SHA-512, MT, and Rule 30 CA. According to Algorithm 1, each TPM weight takes an integer value from the set . Hence, each weight has (2L+1) possible values. Since the TPM contains N hidden neurons and K input neurons connected to each hidden neuron, the total number of weights is N × K. Therefore, the number of possible TPM weight configurations corresponding to one synchronized final weight vector is given by . In the proposed encryption scheme, two TPM-derived final weight vectors, namely finalWeightVector1 and finalWeightVector2, are used to generate the seeds and for two different stages of the encryption process. Therefore, when these two TPM outputs are generated independently, the overall key space becomes . For the parameter setting adopted in this work, (N,K,L)=(100,10,10), the resulting key space is . This key space is sufficiently large to render exhaustive brute-force search computationally impractical. Therefore, the proposed scheme provides a high level of resistance against brute-force attacks (Table 12). Table 12Key space values comparison.SchemeKey spaceProposed scheme 242545474849 Key space values comparison. Security of TPM-based key exchange TPM synchronization is employed to establish a shared session secret over a public channel. Under a passive eavesdropping model, known TPM attacks (e.g., geometric/flipping-style attacks) may be attempted, in which synchronization of an attacker TPM is pursued using the observed input–output transcript. The effectiveness of these attacks is parameter-dependent and is influenced by the TPM structure (K, N, L) and the learning/update rule; therefore, (K, N, L) are explicitly treated as security parameters, and reliance is placed on established results in the TPM literature indicating that attacker convergence is significantly less likely and/or typically slower than legitimate synchronization for recommended parameter ranges. Under an active adversary model, authentication is not provided by TPM synchronization alone, and vulnerability to MITM attacks is therefore implied, in which two independent synchronizations can be executed by the adversary and distinct keys can be established with each endpoint. To address this limitation, the key-establishment procedure must be combined with an authentication mechanism (e.g., MAC-based key confirmation or certificate/PSK-based authentication). This requirement is incorporated into the revised protocol description, and the corresponding security claims are updated accordingly. The national institute of standards and technology analysis Statistical randomness of the encrypted outputs is evaluated using the NIST SP 800-22 test suite, in which bit-streams derived from the encrypted images were tested against the randomness hypothesis at a typical significance level (e.g., α =0.01), and p-values and pass rates were reported. As shown in Table 13 (aggregated over the tested images, each represented by a bit-stream length over 1.5 MB), Pass outcomes were obtained for all listed tests, with pass rates largely reported as 1.000 and acceptable p-values (e.g., Frequency p=0.487, Runs p=0.524, Approximate Entropy p=0.719). A slight reduction is observed only for Random Excursions (Avg.) (pass rate 0.958), while an overall pass rate of 0.998 is maintained, indicating that strong pseudo-random behavior is achieved by the encrypted bit-streams. Table 13Detailed NIST suite results aggregated over the tested images.Test namePassp-ResultratevalueFrequency1.0000.487PassBlock Frequency1.0000.425PassCumulative Sums (Fwd.)1.0000.420PassCumulative Sums (Rev.)1.0000.464PassRuns1.0000.524PassLongest Run1.0000.681PassRank1.0000.264PassFFT1.0000.619PassNon-Overlapping Template (Avg.)1.0000.788PassOverlapping Template1.0000.537PassUniversal (Maurer’s)1.0000.307PassApproximate Entropy1.0000.719PassRandom Excursions (Avg.)0.9580.393PassRandom Excursions Variant (Avg.)1.0000.514PassSerial 11.0000.607PassSerial 21.0000.593PassLinear Complexity1.0000.455PassOverall0.998—Pass Detailed NIST suite results aggregated over the tested images. Comparative analysis with the literature In this section, Table 14 presents a comparative analysis of the performance of the proposed scheme with various image encryption algorithms. Notably, the proposed algorithm demonstrates a low PSNR and a high MAE relative to most alternative methods, which is a positive outcome in this context. A reduced PSNR indicates that the encrypted image bears less resemblance to the original, while a higher MAE signals more substantial alterations to the image. These characteristics are advantageous, as they imply stronger encryption. The entropy values are nearly at their maximum, and the very low or even negative correlation coefficients further validate the randomness of the encryption process, ensuring minimal similarity to the original image. These factors make the encryption more resilient to statistical analysis and attacks. Furthermore, the algorithm’s high NPCR and reasonable UACI values validate the significant sensitivity and intensity of the modifications, reinforcing the algorithm’s ability to secure sensitive geographic data effectively. Moreover, the results displayed in Table 11, demonstrate that the encryption rate of the proposed scheme is faster than that of all the compared algorithms. The encryption rate of an encryption scheme is influenced by several factors, including the algorithm itself, machine specifications, and software configuration. Table 14Comparative metrics overview.ImageSchemeMSEPSNRMAEEntropyCCNPCRUACIVHDPeppersProposed10140.48.0702482.33717.99894-0.002791410.00194988-0.00027927199.596232.28912410049.48.1093981.89957.99716-0.0015191-0.00208780.00065688--2510092.38.0908981.77407.99877-0.00102-0.00063-0.0000399.5936032.1752326-8.0968982.02747.999080.005803090.00245556-0.0026535499.627232.16762710897.507.7577927.99980.00080.00130.0011--28-8.1156-7.9991-----297274.449.55---0.0028-0.0090-0.000799.562633.54864510298.78.0029682.32737.99510.0010430.0043310.00185699.634832.183246-31.2463-7.5918-0.002791410.00194988-0.00027927199.615533.5595MandrillProposed8291.118.9446875.04957.99893-0.004825790.001531-0.0071739799.613429.4312248333.148.9227275.33177.99743-0.00197990.0013408-0.004713--258295.218.9425375.16597.99907-0.001380.001362-0.0033299.5819029.3976426-8.9394675.13277.99914-0.00298955-0.00309558-0.0000746999.618529.46382710930.337.7447927.99910.0011-0.00010.000399.6133.5128-8.9695-7.9991-----296399.0510.10---0.0029-0.00790.002699.592633.4496458573.388.7992981.9137.99050.003522-0.004840.00342999.612429.3973 Comparative metrics overview. In summary, these comparative results demonstrate that the proposed encryption method is highly suited for high-security applications where maintaining data integrity and confidentiality is critical (Table 15). Table 15Evaluation of the proposed S-boxes.S-boxNLSACBICLAPDAP1080.5017091080.0781250.0156251080.5002441080.0781250.015625Ideal values1120.51120.06250.015625 Evaluation of the proposed S-boxes. Conclusions This article presented a 3-level scheme to image encryption. The scheme combines TPMs for secure key exchange, DNA coding, MT-based DNA sequences generation, SHA-512 seeded Rule 30 Cellular Automata for generating a PRNG, and S-box construction for ultimate encryption. Each technique offers unique advantages and employs distinct mathematical principles to achieve encryption. The proposed scheme’s performance is evaluated through a variety of tests and measurements, including histogram, pixel cross-correlation, entropy, MSE, PSNR calculations, and others that demonstrated excellent results in terms of security, resistance to attacks, and computational efficiency. Upon comparing it with counterpart algorithms from the literature, its security was found to be highly comparable. Limitations Despite being designed for efficient cloud-based image exchange, the proposed scheme has some limitations. (i) Computational complexity: the multi-stage pipeline (bit-stream conversion, XOR, S-box substitution, DNA operations, and CA-based masking) adds cumulative cost that grows with image size, and Algorithm 3 may incur extra overhead depending on the threshold and iterations needed to accept an S-box. (ii) Synchronization overhead: TPM key establishment is interactive and may introduce latency and communication overhead; decryption also requires strict agreement on all parameters (TPM settings, seeds, thresholds, and mapping rules). (iii) Scalability: high-resolution images, many concurrent sessions, or frequent key refresh can stress compute/network resources due to per-session TPM synchronization and memory-intensive transforms, motivating optimized implementations and larger-scale cloud benchmarking. Future work Further research could include: (i) investigate the feasibility of combining the proposed algorithm with homomorphic encryption techniques to enable secure computation on encrypted data50, (ii) carry out a hardware implementation for improved encryption throughput51, and (iii) explore the utilization of other CA rules52, as well as higher order CA53. Author contributions Conceptualization: Wassim Alexan; Formal analysis: Maran Malak and Salma Khaled; Investigation: Maran Malak, Salma Khaled, and Youstina Megalli; Methodology: Maran Malak, Salma Khaled, and Youstina Megalli; Project administration: Wassim Alexan and Maggie Mashaly; Software: Maran Malak, Salma Khaled, and Youstina Megalli; Supervision: Wassim Alexan and Maggie Mashaly; Visualization: Youstina Megalli; Writing – original draft: Wassim Alexan and Youstina Megalli; Writing – review & editing: Wassim Alexan and Maggie Mashaly. Funding Open access funding provided by The Science, Technology & Innovation Funding Authority (STDF) in cooperation with The Egyptian Knowledge Bank (EKB). Data availability The datasets used and/or analyzed during the current study are available from the corresponding author on reasonable request. 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 Associated Data Data Availability Statement The datasets used and/or analyzed during the current study are available from the corresponding author on reasonable request.