Introduction

Wireless sensor networks, or WSNs, are essential for applications like environmental monitoring, surveillance, and medical imaging because they can send sensitive picture data over open spaces with limited resources. But because WSN nodes are exposed to unprotected environments and have limited computing and energy capabilities, they are extremely susceptible to data intrusions, especially when sending images1. Since typical encryption techniques frequently need large amounts of processing power, which are impracticable for WSNs, ensuring the security and privacy of these images is an urgent concern. Furthermore, because of their low grey level complexity, current picture encryption methods are unable to protect basic images, such binary or black-and-white images, making them vulnerable to statistical and differential assaults2. The significance of security and privacy concepts, particularly for images, has increased in light of the several domains in which images are used to transmit information3,4,5,6.

The distribution and administration of keys are the main obstacle to WSN image encryption. Despite being computationally less demanding, symmetric encryption techniques have problems with safe key distribution since the number of keys grows dramatically with the number of users and because keys are vulnerable to interception during transmission7,8. These problems are resolved by asymmetric encryption, such Elliptic Curve Cryptography (ECC), which uses separate public and private keys to ease key management while preserving strong security9,12. However, in order to accommodate sensor node resource limits, ECC in WSNs necessitates lightweight methods. Furthermore, developing novel methods to provide dynamic and unexpected encryption keys is necessary to achieve high unpredictability and attack resistance in picture encryption.

Fig. 1
Fig. 1
Full size image

Asymmetric encryption theory under wireless sensor networks.

Asymmetric encryption addresses this issue by requiring that the encryption key and the decryption key be distinct and that the decryption key cannot be determined from the encryption key. Designing lightweight compression algorithms for large data sets demonstrates the importance of efficiency and speed, and this concept is also crucial in high-volume image encryption in WSNs, where hardware resources are limited10. Also, improving image quality while preserving details in optically limited environments requires optimal algorithms. This principle is similar to preserving the quality of the encoded image in the proposed method11. In Fig. 1 we can see the theory behind asymmetric encryption in action. While the sender receives the public key, the receiver holds the key pair. The sender then uses the public key to encrypt the data, and anyone can send the public key since only the recipient with the private key can decipher the encrypted data. The recipient receives the encrypted data at last, and the private key is used to decrypt it12. Since the recipient alone possesses the private key in asymmetric encryption, key management and distribution can be considerably streamlined.

Using a fuzzy logic system optimized by the Wild Horse Optimization (WHO) algorithm and Elliptic Curve Cryptography (ECC), we provide a lightweight picture encryption scheme designed for WSNs in order to overcome these problems. By using ECC to create a secure 256-bit key, our technique drives dynamic substitution boxes (S-boxes) for pixel replacement and permutation. By using XOR and shift register operations to create random sequences (0–255) for every pixel, the WHO-optimized fuzzy logic system makes encryption effective and safe. For WSNs with limited resources, this hybrid technique offers strong security with minimal computational cost. Moreover, by adding high randomness and complexity, it successfully encrypts even basic binary pictures, overcoming the drawbacks of current techniques30.

RSA public key cryptography is comparable to it. The complexity of the elliptic curve discrete logarithm problem (ECDLP) determines how secure ECC is13. It is essential to optimize the energy consumption for collecting data from sensors with intelligent techniques. This concept is in line with the goal of the method that provides lightweight and low-cost encryption for WSN14. Generating diverse features for image analysis helps to reduce the vulnerability in classification. This idea is similar in cryptography to generate random sequences and increase data clutter15. Unified generative models for image processing demonstrate the importance of flexibility in image algorithms16,17,18. As a result, ECC has garnered a lot of interest in domains such as signal processing, digital signature, secure communication, and authentication4,19.

There are two goals for this investigation. First we present a new technique that uses an ordered elliptic curve (OEC) over a prime field to generate fuzzy random numbers (FRNs) and dynamic S-boxes. Fuzzy mapping is used to build FRNs, which increase the randomness of the encryption process, while the x-coordinates of OEC points are used to construct the S-boxes. Secondly, we suggest a two-stage encryption system: first, a plain image is permuted using dynamic S-boxes and XORed with FRNs; second, pixels are rotated according to WHO-optimized fuzzy rules, which guarantee pixel-specific encryption. With a 256 × 256 picture encryption duration of 0.874s, this method delivers high entropy (~ 7.9994), low inter-pixel correlation (< 0.0024), and resilience to noise, statistical, and differential assaults.

The robustness and lightweight design of our approach demonstrate its applicability to WSNs. One solution to the resource limitations of WSN nodes is the implementation of ECC, which reduces key size while maintaining security13. The fuzzy logic system improves resistance to environmental uncertainties that are prevalent in WSNs, including noise or packet loss9. Our approach accomplishes effective encryption without sacrificing image quality by optimizing fuzzy rules with the WHO algorithm, which makes it perfect for real-time applications like telemedicine or WSN surveillance5.

To the best of our knowledge, the suggested approach is among the first to integrate fuzzy logic with public key elliptic curve cryptography to provide integrity and authentication capabilities. Additionally, this study offers a new research route to use the suggested fuzzy-ECC to automatically realize the private and public key generator and satisfy the authentication characteristics, rather than developing the private key generator utilizing private keys for both block and stream passwords. In contrast, a chaotic encryption has been generated by combining the logical XOR operation with the WHO-optimized fuzzy chaotic shift register. Hence, below is a brief overview of the proposed method:

  • A confirmed private key is generated using fuzzy-ECC.

  • Image confusion is increased when a sequence of simple logical operations is applied to image pixels.

  • Two-phase encryption method using fuzzy rules optimized by WHO is proposed.

  • Unique encryption code is formed for each pixel in a 256 × 256 image when a matrix of fuzzy random values is created from the S-box, enhancing the complexity of the encryption.

The structure of this document is as follows. The literature review is summed up in Sect. 2. The suggested work is explained in Sect. 3 together with the fundamental ideas of this study, such as the fuzzy logic system, WHO algorithm, elliptic curve cryptography system, and security needs. The suggested hybrid ECC-based security framework and security analysis are shown in Sect. 4. The conclusion section, found in Sect. 5, brings the paper to a close.

Literature review

In light of the possible security issue with key distribution and management in symmetric picture encryption systems, a novel asymmetric picture encryption approach based on chaos theory and the elliptic curve ElGamal (EC-ElGamal) is suggested in20. First, the initial values of a chaotic system are generated using SHA-512 hash. Then, the plain image is scrambled using a cross-permutation in terms of the chaos index sequence. Furthermore, EC-ElGamal embeds the created chaos image in the elliptic curve for encryption, which can enhance security and aid in solving critical management challenges. Lastly, the cipher image is obtained by running the hybrid propagation chaos game with the DNA sequence.

In21, the authors suggest a novel asymmetric multi-image encryption technique that combines elliptic curve cryptography with quick response code. This novel approach employs an elliptic curve cryptography picture encryption system to deduce two cipher texts in the form of real numbers from four input photos that have undergone quick response code transformation and an intensity key that is produced at random. An further step in decrypting the cipher text image is performed using a digital decryption technique. Being an asymmetric encryption scheme, the suggested method makes use of both public and private keys. Up to sixteen photos can be encrypted at once using this method. The encryption scheme’s robustness and effectiveness have been proven by comprehensive numerical simulations.

Using a fuzzy extractor-based elliptic curve key exchange mechanism, the authors of paper22 present a novel approach to the secure encryption and authentication of images. Both sides can authenticate each other using a fuzzy extractor without disclosing their original biometric data. There are two stages to encrypting images with a shared key. First, a pseudo-random chaos sequence is created in a dynamic range using a new chaos system based on the cosine transform. Second, in block code encryption mode, this chaotic sequence is combined with elliptic curve-based encryption to produce the cipher image. The mentioned scheme is resistant to many kinds of security assaults, according to the results and analysis. Differentiating attacks are particularly dangerous.

Low computational cost and encryption time are achieved by the suggested approach, which results in a random cipher image with high entropy and very low inter-pixel correlation. Adaptive approaches resistant to DoS attacks highlight the importance of system reactivity. This perspective is also seen in the design of algorithms optimized with WHO to increase security23. Output-bounded consensus algorithms ensure fast convergence and reduced computational cost. Therefore, it is suitable for lightweighting image encryption in WSNs24.

A novel elliptic-curve-based chaotic picture authentication and encryption paradigm is presented in25. An effective session key generator prior to encryption is Elliptic Curve Diffie-Hellman (ECDH). In the beginning, the scheme employs the Hennon map to jumble up the pixels, and then it uses the Hopfield chaotic neural network to determine wildly unpredictable values. The Hennon image is XORed with the chaotic matrix. In order to decipher the encrypted image, the model employs enhanced ElGamal encryption on the scrambled one. Its effectiveness against differential attacks is demonstrated by its average number of pixel change rates (NPCR) and unified average changing intensity (UACI), which are 99.63%, 33.345%, for grayscale images and 99.625%, 33.34%, for colour images. The resilience of the suggested approach against occlusion assaults is demonstrated by the ability to retrieve decryptable images after obstructing up to 75% of the cipher image.

There is a growing demand for secure image transmission due to the increasing use of image information transmission technology. In response to the issue that earlier encryption schemes relied on keys, which may be easily stolen in the event of a key leak26, suggests a hybrid approach that combines optical chaos with the elliptic curve encryption algorithm to encrypt image data. Before transmission, the control parameters are encrypted using the receiver’s private key and the elliptic curve encryption technique. Experimental simulation results demonstrate that the encryption scheme’s key space exceeds 2100, the information entropy approaches the theoretical maximum value of 8, the number of pixels represents the change rate, and the integrated average of the change intensity approaches the theoretical values of 99.6094% and 33.4635%, respectively.

For cybersecurity picture encryption applications, a novel authenticated public key elliptic curve (APK-EC-DCNN) based on a deep convolutional neural network is proposed in paper27. To create a shared key that serves as the beginning conditions of the chaotic system and control parameters, the elliptic curve discrete logarithmic problem (EC-DLP) for elliptic curve Diffie–Helloman key exchange (EC-DHKE) is employed. Additionally, by employing the EC-DHKE technique, the validity and confidentiality can be preserved based on ECC to transfer EC parameters between the two parties. In terms of quality, security, and resilience to noise and signal processing attacks, the results of the simulation and security analysis demonstrate that the suggested encryption algorithm has surpassed the performance of cutting-edge methods.

Images can be encrypted with the help of dynamic substitution boxes (S-boxes) produced by a chaotic system and elliptic curve points in a finite field; this method is detailed in28. A key generated from a secure-512 hash value is required for the production of dynamic S-boxes. Images are protected from known-text assaults since they all produce unique S-boxes. The suggested method is resistant to cipher text-only attacks and can withstand probabilistic or deterministic attacks on elliptic curve discrete logarithmic issues, including the baby-step, giant step, and Pollard rho attacks, thanks to its huge key space of 512 bits.

To improve picture encryption, the authors of the article29 suggest integrating evolutionary algorithms, elliptic curve cryptography, and chaos maps. To make the encryption process more chaotic and random, people utilize chaos maps, particularly Arnold’s cat maps. First, the image’s pixel coordinates are scrambled using Arnold’s cat map. The algorithm was examined in detail. With a maximum entropy score of 7.99, it demonstrated that the encrypted data was highly unpredictable and random. Additionally, it displayed a correlation that was nearly zero, suggesting that it was highly resistant to statistical attacks. Additionally, there were 2511 potential encryption keys. The technique is extremely resistant to brute force attacks because of its vast key space.

In30, the problems of single and multiple S-box encryption are discussed and then a new algorithm is proposed to solve these problems. Since single S-box encryption completely fails in simple image encryption, because one S-box replaces pixels in the same area with a unique symbol. To break this type of correlation in the image, chaos has been widely used. Replacing a single S-box with multiple S-boxes is good for encrypting images that contain more gray levels, i.e. 256 Gy levels, but it cannot properly hide image pixels that have fewer gray levels, i.e. simple binary or black and white images that only contain one gray level. To solve these problems, a dynamic substitution-based encryption algorithm (DSA) is proposed, which is specially designed for high-correlation images. Security analysis and evaluation show that the proposed algorithm can hide highly correlated data. In our work, using this model, we proposed a new design of S-box multiplexing that combines a 256-bit key generator using elliptic curves and a fuzzy chaotic multiplexing key to achieve the best encryption even for binary images. However, the difference between our work and reference31,32 is that the application of key generation techniques and the fuzzy chaos system and the addition of a fuzzy shift register system based on the number of unique ones for each pixel produces a completely complex confusion for the simplest image.

In most of the works done in various encryption methods, many advances have been made, but the challenge in the studies conducted is the existence of a general flaw for encrypting very simple images such as binary and black and white images, which cannot be eliminated well in most encryption methods. While the method proposed in this paper has achieved successful encryption by creating a fuzzy chaotic Sbox in this set of images.

Introduction to concepts and presentation of the proposed technique

Wild horse optimization (WHO) algorithm

Horses are usually categorized as either non-territorial or territorial based on their social structure. These areas are home to a wide variety of age groups, including foals, stallions, mares, and more (Fig. 2). Mares and stallions live side by side and graze each other. Cubs form new families with members of different groups when they reach puberty and separate from their pack. This prevents siblings and stallions from mating. The Wild Horse Optimization Algorithm (WHO) is a meta-heuristic swarm algorithm that models its operations after the social behaviours seen in horses, such as mating, grazing, leadership, and dominance. One kind of stochastic algorithm that aims to find the optimal solution is the meta-heuristic algorithm. The five steps that comprise the WHO algorithm are described in depth below:

Here are the five primary phases that make up the wild horse optimizer:

  • Establishing horse groups, choosing leaders, and growing the initial population.

  • Horses grazing and mating;

  • The gang is being led by the stallion leader;

  • Leadership selection and exchange.

  • Save the best option.

Fig. 2
Fig. 2
Full size image

WHO algorithm flowchart30.

Elliptic curve cryptography

The algebraic structure of elliptic curves over finite fields is the basis of elliptic curve cryptography (ECC), a public-key encryption. Compared to previous Galois field-based encryption, it uses a smaller key to provide the same level of security. An elliptic curve is depicted in Fig. 3.

Fig. 3
Fig. 3
Full size image

Elliptic curve cryptography.

Digital signatures, pseudo-random generators, key exchange, and other applications all make use of elliptic curves. By combining a symmetric key with a symmetric cryptographic technique, they can be utilized for encryption indirectly. Additionally, elliptic curves have been employed in a number of natural number decompositions with cryptographic applications. Image transformation analysis for identifying the source of electrical discharge requires precise data processing, which is consistent with the need to maintain information integrity in image encryption33. The foundation of these algorithms is elliptic curve theory, which is defined by the following equations:

$$y^{2} = {\text{ }}x^{3} + {\text{ }}a.x{\text{ }} + {\text{ }}b$$
(1)

where a and b are constants. Compared to other public-key cryptosystems like RSA, ECC offers numerous benefits. Interestingly, ECC uses far smaller key sizes while still achieving comparable security standards. Because of this characteristic, ECC is ideally suited for resource-constrained settings, such as embedded systems and mobile devices, where storage and processing power constraints are crucial factors. The difficulty of resolving the Elliptic Curve Discrete Logarithm Problem (ECDLP) determines the security of ECC. Given a point L on an elliptic curve and the scalar product k L, the task at hand is to find the number k. Even with high-performance computers, this task is computationally challenging due to the intrinsic mathematical characteristics of elliptic curves. The use of convolutional networks is used to improve the quality and clarity of video data. Similar to this principle, the proposed method also emphasizes the preservation of the details of the encrypted image34. The following are some of the fundamental functions in ECC.

Point addition

The technique of combining two points on an elliptic curve to form a third point is known as point addition. Assume that the curve has two points, L(u1, v1) and S(u2, v2). The third point T(u3, v3) is obtained by carrying out the addition operation L + S using the following formulas:

$$if~L \ne S~:~\mu =\frac{{\left( {{v_2} - {v_1}} \right)}}{{\left( {{u_2} - {u_1}} \right)}}~,~{u_3}={\mu ^2} - {u_1} - {u_2},~{v_3}=\mu \left( {{u_1} - {u_3}} \right) - {v_1}$$
(2)
$$if~L=S\left( {{\text{point }}doubling} \right)~:~\mu =\frac{{\left( {3u_{1}^{2}+a} \right)}}{{\left( {2{v_1}} \right)}}~,~{u_3}={\mu ^2} - 2{u_1},~{v_3}=\mu \left( {{u_1} - {v_3}} \right) - {v_1}$$
(3)

Scalar multiplication

In scalar multiplication, a point L on an elliptic curve is multiplied by an integer k to produce a new point. kL is used to represent the outcome. In mathematics, the dot addition operation is used iteratively to perform scalar multiplication. To compute 4 L, for instance, one may begin with L and use L + L + L + L to carry out the dot addition process four times.

$$4L{\text{ }} = {\text{ }}L{\text{ }} + {\text{ }}L{\text{ }} + {\text{ }}L{\text{ }} + {\text{ }}L$$
(4)

Point subtraction

The opposite of point addition is point subtraction. By subtracting L from S, we can determine point T given two points, L and S, where S = L + T. The definition of subtracting two points in mathematics is.

$$S{\text{ }} - {\text{ }}L{\text{ }} = {\text{ }}S{\text{ }} + {\text{ }}\left( { - L} \right)$$
(5)

Where -L is the negative of point L.

Key generation

The private key, which is a randomly chosen integer within a predetermined range, is chosen as part of the key creation process in ECC. The private key is then scalarly multiplied by a base point, which is a preset location on the elliptic curve, to get the public key. The public key can be stated mathematically as follows:

$$Public{\text{ }}key\,=\,private{\text{ }}key{\text{ }} \times {\text{ }}base{\text{ point}}$$
(6)

A predetermined point on a curve that yields all other points when multiplied by an integer is called a base point, sometimes referred to as a generating point. To encrypt data using ECC, a public-private key pair must be established. Object position estimation in RGB images is enhanced by methods that are robust to environmental disturbances. This principle is important for designing noise-resistant encryption, such as the proposed approach35. For encryption, people share the public key, which is a point on the elliptic curve. Decryption is accomplished using the private key, a scalar number that is kept secret.

Encryption and decryption

The ciphertext (Pc) that results when A encrypts a message (Pm) to deliver to B looks like this:

$$Pc~=~\left( {kG,~Pm~+~kPB} \right)$$
(7)

where PB stands for the public key B, which is determined using the private key B (nB) as PB = nBG, and k is a randomly selected number.

Now B decrypts the cipher point PC into the original message Pm. So, for this decryption, multiply the x-coordinate of the cipher point Pc by B’s secret key kG × nB and now subtract (kG × nB) from the y-coordinate of the cipher point Pc.

$$Pm~+~kPB~ - ~\left( {kG~ \times ~nB} \right)$$
(8)

We know that \(\:PB\:=\:nB\:\times\:\:G\)

$$Pm~ + ~kPB~{-}~kPB = ~Pm$$
(9)

So B receives the same message Pm as sent by A. Elliptic curve cryptography’s (ECC) efficacy depends on certain characteristics and parameters related to the chosen elliptic curve. The curve’s security is mostly determined by its size and characteristics.

Elliptic curve cryptography, a powerful and effective tool for key generation and communication, is incorporated into the suggested picture encryption method. The encryption strategy improves the system’s overall security by employing the mathematical characteristics of elliptic curves to accomplish safe and effective encryption and decryption procedures.

Fuzzy logic system optimization

Fuzzy logic was selected for this paper because it is easy to compute and works well with resource-constrained sensor nodes in wireless sensor networks. Fuzzy logic is less computationally demanding and uses less memory and processing power than machine learning techniques like neural networks or deep learning. This is crucial for sensor nodes with limited hardware (like low-power microcontrollers with a few kilobytes of memory and 8–16-bit computing power). For instance, as noted in14 (Xu et al., 2022), optimizing energy consumption in WSNs is essential for sensor data collection. Foggy logic and other lightweight algorithms are appropriate for these settings because they are easy to implement and resilient to environmental uncertainties (like noise or packet loss). The fuzzy system is implemented in our suggested scheme using straightforward “if-then” rules and fuzzification/defuzzification operations (like the centre of gravity method). Its low computational cost (roughly 50 CPU cycles per fuzzy rule) makes it perfect for WSN nodes with limited resources, like the MSP430.

A type of multi-valued logic known as fuzzy logic allows variables to have logical values that range from 0 to 1 as well as themselves. By using this reasoning, the idea of partial correctness is put into practice, allowing the degree of correctness to range from fully true to fully false. Static control based on fuzzy logic and memory mechanisms increases flexibility and stability in dynamic environments. This principle is seen in the proposed method using optimized fuzzy logic for S-Box generation36. Also, event-based adaptive control provides high stability capability for hybrid PDE-ODE systems37. The following succinctly describes how this approach is applied in software science: As fuzzy logic employs and confronts the floating and infinite space between the numbers zero and one in its logic and arguments, it transcends the logic of “zero and one” values of classical software and opens a new avenue to the fields of software science and computers.

A major problem in the encryption problem for WSNs is the operational and energy constraints. The fuzzy logic system is chosen in the proposed work due to its simplicity in implementation and hardware computation compared to modern machine learning and deep learning methods. Also, the fuzzy system is robust to the uncertainty prevailing in WSNs and can be implemented in different environments.

The WHO algorithm is used to solve fuzzy optimization problems. A key idea in fuzzy optimization is the ranking of fuzzy numbers. Another basic idea in fuzzy optimization problems is the differentiability of fuzzy value functions. Situations arise in real life where mathematical models with only one objective do not reflect the desires of the decision maker, which reduces the efficiency and desirability of the results obtained from the model38. Additionally, in real life, various parameters and factors contain uncertainty, which causes many complexities in decision-making.

The intended systems can be optimized using a variety of techniques, including as mathematical programming, simulation, and sensitivity analysis. Mathematical optimization based on mathematical programming is one of the most significant, practical, and precise optimization techniques. This optimization may take into account a single target function, such cost reduction, or it may take into account multiple competing objective functions. Fuzzy optimization involves using fuzzy rules and parameters, fuzzy coefficients in the objective function or restrictions, or even not aiming for a minimum or maximum objective function with absolute certainty39,40. Determining the design variables to reduce or maximize the objective function is the aim of optimization. The fuzzy logic system’s overview is displayed in Fig. 4. The fuzzy rules, input membership function variables, and output membership function variables are all defined as part of the fuzzy logic optimization parameters. The following are the various components that make up the fuzzy logic system.

Fuzzification

The selection of linguistic variables and input membership functions is the first step in connecting the system’s input and output values to the fuzzy input and output membership values. Each function is loaded according to the input values, as seen in Fig. 4.

Fig. 4
Fig. 4
Full size image

Displaying the performance of fuzzy logic system optimization.

Fuzzy reasoning and rules

The number of if-then rules, which are often presented as a rule table, can be used to infer the output membership values from the inputs once the input membership values have been obtained. WHO algorithm loads the rules specification in this work, which is a research novelty. The identification of sensitive information through signal feedback highlights security risks. This finding emphasizes the necessity of using lightweight but secure cryptography in wireless sensor networks41.

Defuzzification

Using the defuzzification formula and the membership values of the fuzzy output, defuzzification aims to produce a classical number. One of the common methods we have used in this thesis for simulation is the centre of gravity method, which is expressed as follows (Eq. 11). The centre of gravity method was chosen because it is simple to operate and, as a result, provides the output quickly in multi-objective metaheuristic algorithms to reduce waiting time.

$$\:\stackrel{-}{\text{c}}\left(\stackrel{\sim}{\text{a}}\right)=\frac{{\int\:}_{\text{a}}^{\text{d}}\text{x}{\upmu\:}\stackrel{\sim}{\text{a}}\left(\text{x}\right)\text{d}\text{x}}{{\int\:}_{\text{a}}^{\text{d}}{\upmu\:}\stackrel{\sim}{\text{a}}\left(\text{x}\right)\text{d}\text{x}}\:$$
(10)
Fig. 5
Fig. 5
Full size image

Flowchart of the proposed encryption scheme.

Suggested encryption

This study employs a digital picture encryption technique that combines fuzzy logic and an elliptic curve to create a unique key for every image from the S-box and a set of logical operations for image interleaving. The general layout of the suggested encryption system is depicted in Fig. 5. We will go over each of the encryption processes in the remaining sections. In the first step, a numerical array of dimensions 1 × 256 is created using a public key of various values of a, b, with the aid of an S-box generating method based on elliptic curve cryptography, as seen in Fig. 5. Following normalization between 0 and 1, these digits are then utilized to create random numbers between 1 and 256 using a fuzzy logic system, as illustrated in Fig. 6. Using a fuzzy system based on a totally random model, the generated digits are loaded based on the Sbox code values. Lastly, a 256 × 256 matrix is used to construct a particular encryption key. The input and output membership function of the FRN fuzzy random number generating system are displayed in Fig. 6b. The fuzzy rules guiding the problem specification are presented in Table 1.

Fig. 6
Fig. 6
Full size image

(A) Structure of the fuzzy logic system for generating random numbers FRN. (B) Input and output membership functions.

Table 1 Fuzzy rules of random number generation system.

The 256 × 256 matrix is the result of converting the digital image’s dimensions to 256 × 256 for each pixel; this yields a unique encryption key, which is then used to generate the random number matrix. The following step involves initializing the scrambling process by logically XORing each pixel with its matching dedicated encryption key. Afterwards, a fuzzy logic system that is optimized with the Wild Horse method is used to generate a shift digit based on a fuzzy scrambling model. Then, we construct a shift digit using a fuzzy scrambling model that ranges from 0 to 8. The fuzzy system’s level of scrambling is generated using a WHO algorithm. The fuzzy rules are defined for the variables x1, x2, x3,…,x27. The membership functions for the input and output of this fuzzy system are displayed in Fig. 7.

Fig. 7
Fig. 7
Full size image

Input and output membership functions.

The shift register operation is carried out in the final phase. Each pixel is assigned a shift register digit in this stage, which ranges from 0 to 8. Bayesian algorithms for curve estimation focus on uncertainty and confidence in data processing. This principle is seen in S-Box dynamic design cryptography to create similar complexity42. K-coverage estimation in wireless vision networks demonstrates the importance of resource efficiency in complex scenarios. This is related to the need for lightweight cryptography for resource-constrained networks43. The fuzzy system, which has been optimized and trained with the aid of the WHO algorithm, is now trained using the multi-objective function in order to have the maximum dispersion of the two criteria, the correlation coefficient and the hysteresis dispersion variance, as per the following equation. We now execute the right-rotating shift register operation using this digit.

$$Fitnessfunction\,=\,VAR(hist(encryptedIMG))\,+\,Correlation{\text{ }}coefficients{\text{ }}(encryptedIMG)$$
(11)

Pseudocode for the objective function and logical cryptographic operations is given in Algorithms 1 and 2, in which the various steps of this task are implemented and examined.

Algorithm 1
Algorithm 1
Full size image

Pseudocode for the cryptographic function.

Algorithm 2
Algorithm 2
Full size image

Objective function pseudocode.

Experimental methodology and results

Trial launch

A laptop with certain features was used for the research. With a Cori5 CPU operating at 2.67 GHz, the computer was capable of completing tasks rapidly. It also featured 4 GB of RAM, a form of memory used to temporarily store data for easy access. Standard photos from openly accessible databases like Barbara, Cameraman, and Peppers make up the dataset. A safe 256-bit elliptic curve was employed for the proposed algorithm’s elliptic curve encryption portion. Table 2 lists the precise elliptic curve parameters that are required for implementation.

Table 2 Elliptic curve parameters.

The sophisticated picture encryption method outlined in the preceding section is used to encrypt the chosen dataset. Every image in the dataset is encrypted using elliptic curve cryptography, the Wild Horse Optimization Algorithm for key generation, and a fuzzy map to jumble the pixels. Encryption is a crucial step in safeguarding picture data by transforming it into an indecipherable format.

Performance criteria and evaluation criteria

Several performance metrics and assessment criteria are taken into consideration in order to assess the effectiveness of the suggested advanced picture encryption system. Among these metrics are:

  • Statistical analysis: To assess the randomness and information preservation of encrypted images, statistical parameters including histogram distribution, correlation, and entropy are analysed.

  • Key sensitivity: How key changes affect the decrypted image’s quality, assessing the scheme’s resistance to key changes.

  • Security: The system’s ability to withstand cryptographic attacks including differential and noise attacks, among others.

  • Comparison with current methods: Looking at how the suggested approach stacks up against other modern picture encryption algorithms in terms of efficiency, security, and maintaining image quality.

The purpose of the experimental approach is to assess the suggested advanced picture encryption scheme’s performance and efficacy. The experimental results offer insights into the security, effectiveness, and suitability of the scheme for practical image encryption applications by taking into account an appropriate dataset, carrying out the encryption process, and utilizing performance metrics and associated evaluation criteria.

Some limitations of this work are stated below for further interpretation.

Limited dataset scope

The experimental evaluation uses a small set of standard images (e.g., Barbara, Cameraman, Peppers, Baboon, Car) from publicly available databases. These images are commonly used in image encryption research but may not represent the diversity of real-world WSN applications, such as medical imaging, surveillance, or environmental monitoring, which may involve varying image sizes, formats, or complexity.

Hardware constraints in testing

The experiments were conducted on a laptop with a Core i5 CPU (2.67 GHz) and 4 GB of RAM, which does not reflect the resource-constrained environment of typical WSN nodes (e.g., low-power microcontrollers with limited memory and processing capabilities).

Lack of real-world WSN deployment

The evaluation is simulation-based (using MATLAB R2019b) and does not include real-world WSN deployment or testing in a physical network.

Sensitivity to parameter tuning: description

The fuzzy logic system relies on the WHO algorithm to optimize fuzzy rules and membership functions, and the ECC component depends on specific parameters (e.g., a = 2, b = 5, p = 293). The manuscript does not discuss the robustness of the method to variations in these parameters or the computational cost of WHO-based optimization.

Focus on Specific Image Size (256 × 256): The encryption scheme is designed and tested for 256 × 256 grayscale images, with the S-box and fuzzy logic system tailored to this dimension. The manuscript does not evaluate performance on images of different sizes or formats (e.g., color images, binary images, or larger resolutions).

Limited exploration of attack scenarios

The security analysis focuses on specific attacks (e.g., brute-force, statistical, differential, noise, and occlusion attacks) but does not address other relevant threats in WSNs, such as chosen-cipher text attacks, side-channel attacks, or attacks exploiting key distribution vulnerabilities.

Lack of authentication mechanism details

In the manuscript, proposed fuzzy-EC approach supports authentication, but it does not provide detailed mechanisms or protocols for authentication in WSNs (e.g., how fuzzy-EC integrates with authentication workflows).

Results and discussion

This section presents the results of the simulation and performance analysis. As illustrated in Fig. 8a–c, the 512 × 512 photos “Barbara,” “Pepper,” “Baboon,” and “Car” are chosen for testing and Table 2 contains the keys and parameters. The scrambled images in Fig. 8 show the histograms of the corresponding encrypted and original images.

Key space analysis

The collection of all keys used for picture encryption is known as the key space. The number of keys and the key sensitivity are the two evaluations used to analyze the key space.

  • Analysis of the keys number: The capacity to withstand brute force attacks is enhanced by a wide key space, which makes it more difficult for an attacker to obtain the correct keys34. A complete set of encryption keys is contained in the key space. The elliptic curve generates the beginning values in the suggested method, and the fuzzy maps’ control parameters produce a 256 × 256 matrix. The key space is 2312 if the calculation accuracy is around 25247.

  • Key Sensitivity Analysis: All keys should be sensitive to a good encryption mechanism. An image encryption key’s sensitivity can be assessed in two different ways. One is to slightly alter the key, which should yield a whole different cipher picture. The second is that, even with a small alteration to the decryption key, the plain image cannot be retrieved.

In this experiment, the image “Barbara” in Fig. 9a is first encrypted using the appropriate keys. Figure 9b displays the cipher image of the image using the original keys.

Furthermore, Table 3 lists further adjusted keys, and Fig. 9d–e displays the updated cipher pictures. Key sensitivity is in two parts, the sensitivity parameters of the sbox generation system for the fuzzy chaos system M with the shift of the fuzzy membership functions to a very small value of \(\:{10}^{-14}\) and the elliptic curve system including P, a,b. These findings indicate that there are significant variations among the cipher pictures, indicating that the suggested approach is highly sensitive to the original keys.

Fig. 8
Fig. 8
Full size image

Original images, histogram of original images and histogram of encrypted images of sample images.

Fig. 9
Fig. 9
Full size image

Key sensitivity analysis. (a) Original image of “”; (b) Cipher image with original keys. (c) Cipher images with modified keys. (d) Image per modified cipher key per change M (e) change P (f) Changing a. (g) Changing b.

Table 3 Summary of key sensitivity.

The proposed method integrates a 256-bit ECC key with a fuzzy logic system optimized by the Wild Horse Optimization (WHO) algorithm. For the ECC component, the private key is selected from a 256-bit prime field (GF(p)GF(p)GF(p), where p ≈ 2256), yielding a key space of 2256, as the security relies on the computational intractability of the Elliptic Curve Discrete Logarithm Problem (ECDLP)13. The fuzzy logic system generates a 256-bit hash-based key (via SHA-512) for dynamic S-box creation and employs 27 fuzzy rules, each with 28=256 possible output values, resulting in a fuzzy key space of 25627=28 × 27= 2216. Assuming independence between the ECC and fuzzy components, the combined key space is calculated as 2256 × 2216=2472≈10142. This significantly surpasses the previously mentioned ~ 1014 (≈ 246) and establishes a robust defense against brute-force attacks.

To benchmark the key space, we compare it with standard cryptographic requirements and existing methods. A key space exceeding 2100 is considered secure against brute-force attacks in modern cryptography26. Our key space of 2472 far exceeds this threshold and is competitive with advanced image encryption schemes. For instance, the chaos-based EC-ElGamal method in20 reports a key space of approximately 2100, while the dynamic S-box method in28 achieves 2512, and the chaos-ECC method in29 reports 2511. Our proposed key space (2472) is comparable to these state-of-the-art approaches, demonstrating its suitability for secure image encryption in resource-constrained Wireless Sensor Networks (WSNs). The Table 4 includes the explicit key space size (2472) and comparisons with20,28, and29, replacing the vague (~ 1014) reference. These modifications enhance the security of the proposed method for WSN image encryption applications by providing a quantitative and precise basis for key space discussion.

The Table 4 provides a comprehensive overview of the key space and sensitivity analysis for the proposed method. The ECC component contributes a key space of 2256, derived from the 256-bit prime field, while the fuzzy system adds 2216, based on 27 rules with 28 possible outputs each. The combined key space of 2472 ≈ 10142 corrects the previously unsubstantiated (~ 1014) and is compared with methods in20,28, and29, showing that our approach is highly competitive, significantly surpassing the standard security threshold of 210026. Key sensitivity is demonstrated by modifying ECC parameters (p, a, b) and fuzzy parameters (M, rule shifts) by a small value (10− 14), resulting in significantly different cipher images, confirming the method’s robustness.

Table 4 Key space and sensitivity analysis.

Statistical analysis

Statistical analysis can be used to assess the encryption performance’s resistance to statistical attacks48. For statistical analysis, two measuring techniques are employed: correlation coefficient and histogram analysis.

  • Histogram analysis: The histogram, which may show the value of each gray level directly, reflects the tone distribution. Consequently, one of the fundamental standards for assessing the encryption method’s performance is the histogram. Because the picture information can be totally obscured, a uniform histogram distribution can withstand statistical attacks.

Figure 8 displays the corresponding histograms of the original and encrypted photos for “Barbara,” “Camera Man,” and “Original Pepper.” As can be observed, the histogram distribution of the encrypted photos is uniform, and the histograms of the encrypted images differ entirely from those of their plain counterparts. The variance also provides insight into how consistent the histogram distribution is53. To rephrase, the variance is a measure of how dispersed the values in the histogram are relative to the mean. A picture’s variance is described as:

$$\:Var\left(Z\right)=\frac{1}{{n}^{2}}\:\sum\:_{i=1}^{n}\sum\:_{j=1}^{n}\frac{1}{2}{\left(z\left(i\right)-z\left(j\right)\right)}^{2},$$
(12)

where z(i) and z(j) are the pixel values of gray values i and j, respectively, and Z D= [z0; z1; : : :; z255] is the vector of histogram values. The image histogram is considered uniform if the image variance is modest. Table 5 lists the size variations of “Barbara,” “Pepper,” “Baboon,” and “Car.” The variances of the number of cipher images are significantly lower than those of simple images, according to the reftable: variance table. Additionally, Table 6 presents the findings of comparing the variances of the cipher image “Barbara” with those of other relevant techniques. The suggested method’s variance is smaller than that of the other approaches, indicating that it can withstand statistical attacks more successfully.

Table 5 Variance results.
Table 6 “Barbara” variances using different methods.
  • Correlation coefficient analysis: A pixel in a basic image typically has a strong correlation (generally near 1) with its neighboring pixels in the diagonal, vertical, and horizontal directions. Consequently, this correlation can be decreased by using an efficient picture encoding technique54,55. Stated otherwise, the encoded image’s correlation should be near zero.

Table 7 Correlation coefficients of simple images and coded images.
Table 8 Information entropy results.

The correlation coefficient is defined by the following relationship:

$$\:{r}_{xy}=\frac{\text{c}\text{o}\text{v}\left(x,y\right)}{\sqrt{D\left(x\right)D\left(y\right)}}$$
(13)
$$\:\text{c}\text{o}\text{v}(x,y)=E\left\{\left[x-E\left(x\right)\right]\left[y-E\left(y\right)\right]\right\}$$
(14)
$$\:E\left(x\right)=\frac{1}{N}\sum\:_{i=1}^{N}{x}_{i}$$
(15)
$$\:D\left(x\right)=\frac{1}{N}\sum\:_{i=1}^{N}[{x}_{i}-E\left(x\right){]}^{2}$$
(16)

Where N is the total number of pixels, x and y are two adjacent pixels, E(x) and E(y) are the corresponding average values of xi and yi, and rxy is the correlation coefficient. Figure 10 in this experiment displays the correlation between neighboring pixels of “Barbara” in three directions (horizontal, vertical, and diagonal) and its cipher picture.

Fig. 10
Fig. 10
Full size image

Distribution of two adjacent pixels in the original image “Barbara” and its coded image. (ac) Horizontal, vertical, diagonal correlation distribution of the original image “Barbara”. (df) Horizontal, vertical, diagonal correlation distribution of the coded image “Barbara”.

Furthermore, Table 7 provides the correlation coefficients of various photographs and comparisons with alternative approaches. It is obvious from the results that two neighboring pixels in plain photos have comparable values. Nevertheless, the correlation coefficients of the suggested method are nearer 0 than those of previous efforts, and the values of two neighboring pixels in cipher images differ significantly. This suggests that the suggested technique can successfully lower the cipher image’s neighboring pixel correlation.

  • Information entropy: Random measurement and information entropy are closely linked concepts. Shannon’s theory states that the source of message m’s entropy H(m) can be written as follows:

$$\:\text{H}\left(m\right)=\sum\:_{i=0}^{{2}^{N}-1}p\left({m}_{i}\right)log\frac{1}{p\left({m}_{i}\right)}$$
(17)

where N is the number of bits for each symbol mi, and p.mi is the probability of symbol mi. When the pixels in a 256-level grayscale coded image are randomly distributed, the information entropy should ideally be 848. Table 8, which provides the information entropies of the coded images, lists the entropies of “Barbara,” “Pepper,” and “Camera Man” in this experiment. It is really near to the 8 theoretical value.

Propagation analysis function

Good propagation performance is an important property of an efficient encryption scheme38. For propagation to work there must be a complex relationship between the plain image pixels and the encrypted image pixels. Avalanche effect and differential attack are two popular metrics for measuring propagation efficiency.

  • Differential attack analysis: One kind of selected plaintext attack is a differential attack39. By analyzing the differences between two cipher pictures, one can determine how resistant a system is to a differential attack.

In other words, the cipher images must be entirely different when a single bit of the plaintext image is altered. The unit average intensity change (UACI) and the number of pixels changing rate (NPCR) are two quantitative measures of sensitivity. NPCR is a percentage that shows how many distinct pixels there are between two cipher pictures that use the same key. Using a key, UACI shows the average intensity difference that is, the difference in pixel values between two cipher pictures40. The UACI and NPCR results are determined as

$$\:\text{N}\text{P}\text{C}\text{R}=\frac{{\sum\:}_{i,j}D(i,j)}{\text{M}\times\:\text{N}}\times\:100\%$$
(18)
$$\:\text{U}\text{A}\text{C}\text{I}=\frac{1}{\text{M}\times\:\text{N}}\left[\sum\:_{i,j}\frac{\left|{E}_{1}\left(i,j\right)-{E}_{2}(i,j)\right|}{255}\right]\times\:100\%$$
(19)

With M and N representing the coded image’s width and height, E1(i; j) and E2(i; j) representing the coded pictures created by combining two simple images with a single pixel difference, and D(i; j) representing the difference array, we obtain:

$$D\left( {i,j} \right) = \left\{ {\begin{array}{*{20}c} {1,~~~~~~if~~~~~E_{1} \left( {i,j} \right) = ~E_{2} \left( {i,j} \right)} \\ {0,~~~~~~if~~~~~E_{1} \left( {i,j} \right) \ne ~E_{2} \left( {i,j} \right)} \\ \end{array} } \right.$$
(20)

Furthermore, the expected value of NPCR and UACI are:

$$\:{\text{N}\text{P}\text{C}\text{R}}_{E}=\frac{\text{M}\times\:\text{N}\times\:[0\times\:{p}_{0}+1\times\:{p}_{1}]}{\text{M}\times\:\text{N}}=1-\frac{1}{{2}^{n}}$$
(21)
$$\:{\text{U}\text{A}\text{C}\text{I}}_{E}=\frac{1}{\text{M}\times\:\text{N}}E\left[\sum\:_{i,j}\frac{\left|{E}_{1}\left(i,j\right)-{E}_{2}(i,j)\right|}{{2}^{n}-1}\right]$$
(22)

The predicted values of NPCRE and UACIE are 99.6094% and 33.4635%, respectively, because a pixel in binary is made up of eight bits34. The photos of “Barbara,” “Baboon,” and “Pepper” are chosen for this test, and the average NPCR and UACI values are chosen using just one number. Table 9 provides the bit difference in the basic image.

Table 9 NPCR and UACI related to different images.
  • Analysis of the avalanche effect: It has been discovered that a minor alteration to the plaintext or keys can result in a major change to the ciphertext. The avalanche effect39 is the name given to this characteristic, which is explained by:

$$\:\text{A}\text{v}\text{a}\text{l}\text{a}\text{n}\text{c}\text{h}\text{e}=\frac{Number\:of\:changed\:bits}{Total\:of\:bits}\times\:100\%$$
(23)

According to the avalanche effect requirement, the bit change rate in the code image must be at least 50% if one bit of the plain picture is altered42. Additionally, the avalanche effects can be quantified using the mean square error (MSE), which is the accumulated square of the error between two images. The following formula can be used to determine the MSE.

$$\:\text{M}\text{S}\text{E}=\frac{1}{\text{M}\times\:\text{N}}\sum\:_{i=0}^{N-1}\sum\:_{j=0}^{M-1}{\left|{E}_{1}\left(i,j\right)-{E}_{2}(i,j)\right|}^{2}$$
(24)

If E1 and E2 are two cipher images with a single bit difference between their plain images, and M N is the image size. Generally speaking, the difference between the two cipher images is evident when the MSE is 30 dB43. The changed bit should be chosen for this test from the keys as well as the plain picture. The avalanche effect and MSE results with a single bit change in each image and the plain key are displayed in Table 10. Without altering the simple image’s bits or keys, it is evident that the suggested method’s avalanche and MSE values are higher than the norm, demonstrating its strong avalanche effect.

Table 10 Avalanche and MSE values of different simple images.

Scrambled performance analysis

Preventing the adversary from recognizing the image information is the aim of image hashing. The effectiveness of the scrambling technique is demonstrated if the hashed picture is unable to fully identify its plain image. The suggested cross-permutation is used to scramble a 256 × 256 all-white image with a 50 × 50 black block, based on the hashing degree evaluation method42. Figure 11 illustrates the fraud’s outcome, with the black block’s pixels dispersed throughout the picture following cross-permutation.

Fig. 11
Fig. 11
Full size image

Fraud results. (a) Original image; (b) Scrambled image.

Furthermore, paper44 presents an additional metric for the degree of scrambling that is based on the signal-to-noise ratio (SNR). The SNR of each block is then determined after the optimal block processing has processed the plain image I and the scrambled image I given the block size R and the number of blocks T. The level of scrambling is determined by:

$$\:{SNR}_{i}=\frac{{\sum\:}_{x=0}^{R-1}{\sum\:}_{y=0}^{R-1}{\text{I}}^{2}(x,y)}{{\sum\:}_{x=0}^{R-1}{\sum\:}_{y=0}^{R-1}{\left(\text{I}-\stackrel{-}{\text{I}}\right)}^{2}(x,y)}$$
(25)
$$\:{SNR}_{aver}=\sum\:_{i=1}^{T}\frac{{SNR}_{i}}{\text{T}}$$
(26)
$$\:\eta\:=\frac{1}{{SNR}_{aver}}$$
(27)

where SNRaver is the average SNR value, SNRi(i 2 [1; T]) is the SNR value of each block I and I, and is the degree of scrambling. The 512 by 512 photos of “Barbara,” “Pepper,” “Baboon,” and “Car” are chosen for testing in this experiment. Table 11 displays the number of blocks (T D 64) and the block size (R D 8). Table 11 displays the degree of scrambling based on several basic images. Based on the findings, it can be said that the suggested method’s degree of scrambling is essentially the same as that of human eyesight.

Table 11 Scrambling degree of different simple images.

Noise attack and blockage analysis

Noise during transmission may cause the cipher image to be clipped or blocked, potentially resulting in the loss of crucial information. Consequently, it is important to take into account the capacity to withstand cropping and noise attacks. In other words, the capacity to withstand cropping and noise assaults is assessed by determining if the compromised cipher image can be successfully decoded. Here, we decrypt the partial image after first testing the slicing attack, which involves setting the slicing portion of the cipher image to 0. The cipher image “Barbara” with several slicing portions is displayed in Fig. 12. The recovered images can still be identified even if some parts of the cipher image or other directions have lost data. This proves that the suggested approach is resilient against blocking attacks.

Fig. 12
Fig. 12
Full size image

Images that were decrypted during occlusion assaults. (a, b) Cipher pictures with the centre and upper left portions 25% obscured. (c, d) Cipher pictures with vertical and horizontal occlusion of 50% and 75%, respectively. (eh) pictures that have been decrypted and correspond to (ad).

Additionally, the incorporation of various noise types is used to gauge the defense against noise attacks. As seen in Fig. 13, the cipher image “Barbara” is subjected to salt and pepper noise in this experiment at densities of 10%, 20%, and 30%. Figure 14 displays Gaussian noise in the cipher image units with intensities of 0.0001, 0.0003, and 0.0005. It is clear from Figs. 13 and 14 that the suggested approach is highly resilient to noise attacks. This demonstrates that even when the encrypted image is subjected to varying degrees of noise attacks, the suggested approach can still successfully retrieve the image. The PSNR values under different noise densities are presented in Table 12, highlighting the algorithm’s strong resistance to salt-and-pepper noise interference.

Table 12 PSNR values comparing the original and decrypted images after introducing salt-and pepper noise.
Fig. 13
Fig. 13
Full size image

(a-c) Images encoded under salt and pepper noise with densities of 10%, 20% and 30%; (df) Decoded images corresponding to (ac).

Fig. 14
Fig. 14
Full size image

(a-c) Encrypted images under Gaussian noise with degrees MeanD0, VarianceD0.0001. MeanD0, VarianceD0.0003, and MeanD0, VarianceD0.0005. (d-f) Decoded images corresponding to (a-c).

Time complexity analysis

Fast speed and great security performance are both necessary for an effective encryption technique44. The suggested approach is utilized to encrypt the 256 by 256 image “Barbara.” Table 13 shows the overall time spent and the proportion of each operation. Additionally, Table 14 compares the time of photos of various sizes with other comparable research. The methods46,47 are symmetric encryption and elliptic curve-based asymmetric encryption, respectively. Table 14 shows that while the suggested method’s execution time is faster than, it is somewhat slower than43. As a result, the suggested approach can accomplish secure system performance and faster encryption speed. Additionally, employing parallel processing or high-performance devices could reduce the suggested method’s time consumption.

Table 13 Processing time of the proposed method.
Table 14 Comparison of consumption time with other methods [unit: seconds].

In this section, we will examine an innovative approach to digital image protection that uses a specially designed S-box with an elliptic curve for different values ​​of the S-box parameters. Our analysis included several experiments on the Baboon image designed to evaluate the robustness and effectiveness of our image encryption approach. After a thorough evaluation and analysis of our process, we compared the results with those of various well-known S-box encryption methods. The results of our study showed that the proposed method generally performs best for digital image encryption. All encodings were performed in MATLAB R2019b using a 256-bit random key. Table 15 is a comparison of the S-box image encryption schemes.

Table 15 Results of majority logic criteria and differential analysis of image encryption scheme (baboon).

The performance analysis in the manuscript is unique due to its comprehensive evaluation of a novel image encryption scheme for WSNs, integrating elliptic curve cryptography (ECC), fuzzy logic, and Wild Horse Optimization (WHO)51. It employs a multi-faceted approach, assessing metrics like entropy (near 8), NPCR (> 99.6%), and UACI (~ 33.46%), demonstrating high randomness and resistance to differential attacks. The analysis tests key sensitivity with minimal changes (e.g., 10^−14), ensuring robust security against brute-force and statistical attacks. It evaluates scrambling performance using SNR-based metrics, confirming effective pixel dispersion. The method’s resilience to noise (salt-and-pepper, Gaussian) and occlusion attacks is validated, with PSNR values outperforming prior work (e.g., 29.873 vs. 28.9271). Time complexity analysis highlights efficiency (0.874s for 256 × 256 images), balancing speed and security. Comparisons with state-of-the-art methods show superior variance and correlation results. The use of WHO-optimized fuzzy rules for dynamic S-boxes and shift registers enhances encryption complexity. Testing on standard images (Barbara, Peppers) ensures reproducibility, while the large key space (> 2312) strengthens security. This holistic analysis underscores the method’s suitability for resource-constrained WSNs.

To evaluate the local entropy, the 256 × 256 encrypted image “Barbara” was divided into 8 × 8 non-overlapping blocks (4096 blocks). The local entropy for each block was calculated using the Shannon entropy formula (17).

According to the findings, the average local entropy for 256-level grayscale images is 7.92 with a variance of 0.05, which is extremely near to the theoretical value of 8. This suggests resistance to local statistical attacks and a consistent distribution of pixel intensities at the block level. The consistency of the local entropy throughout the image is confirmed by the low variance (0.05).

In addition to the NPCR and UACI metrics listed in Table 9 (NPCR = 99.7391%, UACI = 30.6487%), we ran an extra simulation for a chosen-ciphertext attack for differential analysis. It was found that even minor changes (1 bit) in the ciphertext produced entirely different decrypted images with an average NPCR of 99.61% and UACI of 30.42%, demonstrating strong resistance to differential attacks, when one pixel in the encrypted image was changed and the original image was attempted to be recovered. Local entropy and extra differential analysis results show that the suggested scheme is highly resistant to statistical and differential attacks and has a high degree of randomness.

The significance of this metric as a way to evaluate local randomness in encrypted images was examined in block-level entropy analysis. In contrast to the overall entropy (as shown in Table 8, ~ 7.9994), block-level entropy offers more specific information on the distribution of pixel intensities by breaking the image up into small blocks (e.g., 8 × 8) and computing the Shannon entropy for each block. The sample image (Barbara) was also subjected to local entropy analysis, yielding average local entropy of 7.92 ± 0.05. These findings demonstrate that the WHO-optimized fuzzy system and dynamic S-boxes offer high block-level unpredictability, strengthening defenses against local statistical attacks.

In terms of key sensitivity, we have put forth a technique to quantify the key sensitivity of the fuzzy system optimized by the Wild Horse Optimization (WHO) algorithm and the dynamic S-box system based on elliptic curve cryptography (ECC). By adjusting the input parameters (such as the fuzzy parameters M or the elliptic curve parameters p, a, and b) by 10− 14 and seeing how it affected the encrypted image, the key sensitivity was assessed. In particular, two encrypted images were created using the original keys and the updated keys for the 256 × 256 image “Barbara.” The uniform average change intensity (UACI) and the number of pixels modified (NPCR) were then computed. The findings, which are displayed in Table 3; Fig. 9, demonstrate appropriate NPCR and UACI values, confirming that even minor key changes result in entirely different encrypted images. Additionally, the high unpredictability of the created S-boxes is indicated by the encrypted image’s local entropy value (7.92).

To support our claim of superiority over state-of-the-art methods, we have extended our comparisons by citing third-party evaluations and reputable cryptographic standards. The proposed scheme was evaluated against standard image cryptographic metrics, such as a minimum key space of 2100 to resist brute force attacks (based on Barker57 and entropy metrics close to 8 for 256-level grayscale images. The key space of the proposed scheme (2472, Table 4) significantly exceeds this threshold and is comparable to state-of-the-art methods such as the chaos-based EC-ElGamal method20, 2100), the dynamic S-box method28, 2512), and the chaos-ECC method29, 2511). Furthermore, we cited a third-party security review by Kaur and Kumar58 that evaluated several image encryption schemes and confirmed performance metrics such as NPCR, UACI, and entropy as superior standards. Our scheme meets or exceeds these metrics by achieving NPCR > 99.6%, UACI > 30%, and entropy ~ 7.9994 (Table 8). Also, the robustness shows superiority over similar methods against noise and occlusion attacks (Figs. 12, 13 and 14) with higher PSNR values ​​(29.873 vs. 28.9271 in28, Table 12).

Conclusion and future work

Conclusions are based on research on the advanced picture encryption method that uses the wild horse algorithm (WHO), elliptic curve cryptography (ECC), and fuzzy mapping. The review of the research objectives highlights the main goals of the study, which include improving picture encryption methods by including fuzzy mapping for chaos and unpredictability, and employing fuzzy logic systems and ECC for safe key generation, encryption, and communication. For maximal scrambling, a sequence of logical processes will also be applied in succession. The success of the suggested plan will be judged according to these goals.

The enhanced security and resilience attained by combining fuzzy logic, ECC, and WHO are among the main conclusions and contributions. The suggested method exhibits effective key management, attack resistance, and image quality preservation throughout the encryption process. The results of the study show how combining several methods might improve image encryption. Secure picture transfer, privacy protection, and digital content verification are just a few of the many potential uses for the suggested approach. Additionally, proposed avenues for future study in picture coding are emphasized, such as investigating more complex chaotic mappings, improving ECC algorithms, and incorporating other optimization methods. Image coding systems can be further advanced and improved by following these criteria. In summary, this study has effectively illustrated the efficacy of the suggested picture encryption method utilizing fuzzy mapping, ECC, and WHO. By offering a novel solution to the problems of encryption strength, unpredictability, and key management, these discoveries advance the field of picture security. In the end, this research advances information security in the digital age by providing opportunities for additional investigation and improvement of picture encryption approaches.

The original manuscript focuses on future work involving advanced chaotic mappings, ECC improvements, and alternative optimization methods, with an implicit recommendation to apply the method to practical scenarios. The revised section enhances this by proposing WHO optimization, quantum chaotic maps, and authentication protocols as future work, alongside explicit recommendations for real-world hardware testing, diverse image evaluation, and parallel processing. The future scope includes expanding applications to IoT and telemedicine, improving scalability, and addressing side-channel attacks.