1. Introduction
Nowadays, the volume of image production and manipulation is exceptionally high, driven primarily by the widespread use of smartphones and digital cameras. In addition, there is constant traffic of images on the Internet, which touches virtually every aspect of modern life. To ensure the security and confidentiality of this information, image encryption has become a topic of great importance, with applications spanning numerous domains. The protection of sensitive image databases, such as facial recognition banks [
1,
2] or biometric data [
3], is directly relevant to the general public, as nearly everyone needs to transfer personal images online [
4,
5]. Furthermore, private images are routinely stored and shared via social networks [
6,
7]. A growing need for privacy also exists in biomedical diagnostics [
8,
9], as well as in scientific, spatial, military, governmental, and educational images. Therefore, securing digital images presents a significant and current challenge across a broad spectrum of computational applications.
In recent years, chaotic functions have gained significant popularity in image encryption. This is largely due to their intrinsic properties, such as nonlinear behavior and high sensitivity to initial conditions, which enable the generation of unpredictable pseudo-random sequences. Unlike traditional encryption algorithms, chaotic methods are better suited to the continuous and highly correlated nature of digital images, providing more effective confusion and diffusion mechanisms. Image-oriented encryption specifically addresses scenarios where visual data, including underlying information encoded in pixel values, must be processed directly at the image level while retaining valid image files throughout storage, transmission, and processing. This is crucial for embedded vision systems, real-time perception, and workflows in medical or scientific imaging.
Early approaches relied on simple one-dimensional maps, such as the logistic or tent maps, which were easy to implement but offered limited security. Since around 2019, however, the dominant trend has shifted toward using two-dimensional and hyperchaotic maps, which expand the key space and improve the entropy of the encrypted image [
10,
11]. Notable among these are systems that combine logistic, sine, or exponential maps, as well as 3D–5D systems derived from Lorenz or Chen models. These systems generate multiple positive Lyapunov exponents, thereby increasing dynamic complexity and the unpredictability of the encryption process [
11,
12].
A significant development in this period has been the integration of confusion and diffusion into a single, interdependent process, strengthening the relationship between the original and encrypted pixels. For instance, Teng et al. [
10] introduced an algorithm based on a two-dimensional hyperchaotic map (2D-CLSS) that performs permutation and diffusion simultaneously. This approach achieves high NPCR (Number of Pixels Change Rate) and UACI (Unified Average Changing intensity) values and demonstrates strong robustness against differential attacks. Further innovations include hyperchaotic maps combined with exponential or logarithmic transformations to avoid non-chaotic regions and improve numerical stability [
11]. Additionally, chaotic systems have been integrated with bio-inspired cryptographic mechanisms, such as DNA encoding and dynamic S-boxes, to enhance nonlinearity and information dispersion [
13,
14].
More recently, artificial intelligence has become pivotal in developing modern encryption models that merge complex pseudo-random sources with deep learning. To counter the inherent linearity of traditional optical methods like Double Random Phase Encoding (DRPE), researchers have enhanced it with advanced techniques such as two-dimensional quantum walks for phase mask generation, significantly expanding the key space and attack resistance [
15,
16]. Another example is the AT-ResNet-CM model, designed for medical image encryption [
17]. In this and other hybrid models, chaotic maps act as a powerful pseudo-random source: a logistic system encrypts the ResNet’s output, and AI algorithms optimize the overall process. The ResNet architecture extracts profound image features and accelerates convergence, and an attention mechanism intelligently guides the encryption to focus on critical regions, such as a medical image’s area of interest.
Building on this paradigm of hybridizing chaos with intelligent architectures, subsequent research has demonstrated the efficacy of directly coupling chaotic systems with convolutional neural networks (CNNs) to elevate both security and operational efficiency. One such approach integrates the fundamental properties of randomness and nonlinear mapping from chaotic sequences with the advanced feature extraction capabilities of a CNN [
18]. This synergy enables robust encryption by performing dissimilarity operations between the chaotic sequence and image pixels, guided by the high-level features identified by the network. The result is a significant enhancement in encryption quality and security, as confirmed by experimental comparisons with traditional chaotic methods, alongside improved computational performance and faster encryption/decryption speeds. This trajectory indicates that the most advanced models are evolving beyond simple process combination toward deeply interconnected systems where AI actively shapes and reinforces cryptographic transformation.
Despite these advances, a common limitation persists in many chaos-based encryption schemes: the absence of a deterministic and reproducible link between the user-defined key and the chaotic system’s initial parameters. This often results in ad hoc key-to-parameter mappings that can introduce security weaknesses or hinder reproducibility. To address this limitation, we propose a method that enforces a direct, reproducible, and cryptographically sound mapping between the user key and the chaotic system via a standardized key derivation function (KDF).
In this paper, we present a novel image encryption scheme governed by chaotic functions for both confusion and diffusion stages. The encryption key is derived from 12 user-provided ASCII symbols and four salt words. This material is processed by a PBKDF2-HMAC-SHA256 KDF to generate a 256-bit secret, which is deterministically expanded into a 96-digit balanced decimal seed. This seed initializes a physical two-dimensional delta-kicked oscillator for chaos generation. The first 48 digits drive a chaotic partition–permutation stage, which divides the image into blocks and performs intra-block pixel permutations. The remaining 48 digits generate a chaotic matrix used in a subsequent modular diffusion stage, where the final cipher image is obtained via a modulo 256 operation. The effectiveness and security of the proposed method are rigorously verified through a comprehensive series of statistical, differential, and key space analyses, the results of which are presented and discussed in detail.
2. Encryption Method
The proposed encryption method is applied to grayscale (GL) images with 8-bit depth. It employs two classical cryptographic stages: confusion and diffusion, both governed by deterministic chaotic functions to exploit their pseudo-random properties. Encryption is performed on the real number domain. First, pixel position is scrambled via a chaotic permutation mechanism (confusion). Subsequently, pixel values are altered through a diffusion process that performs a modular sum between the image and chaotic values.
While the method is directly applicable to color (RGB) images by processing each color channel independently, this work focuses on the grayscale case. A more robust extension to RGB would require an architecture that explicitly exploits or disrupts inter-channel correlations to maximize diffusion and overall security, which remains a subject for future work.
2.1. Chaotic Functions and Encryption
The proposed encryption scheme for 8-bit grayscale images is based on a two-stage process: confusion followed by diffusion, governed by a chaotic system. The core of this system is a two-dimensional map derived from the dynamics of a delta-kicked oscillator [
19,
20], defined by Equations (
1) and (
2). These equations, which generate the chaotic state variables
at discrete iteration
n, must be iterated
t times before beginning to construct the arrays of values that will be used in the encryption.
Here, the parameters k and , along with the initial seed values , form a critical part of the encryption key and are user-defined through the KDF. The number t of iterations prior to constructing the chaotic arrays is called the transient. The transient number is also part of the encryption key.
2.1.1. Dynamic Analysis of the Chaotic System
The two-dimensional chaotic system defined by Equations (
1) and (
2) is characterized by its capacity to generate complex, nonlinear trajectories in phase space, making it an ideal candidate for image encryption. To validate its utility as a pseudo-random number generator (PRNG), we numerically evaluated its dynamic properties. The parameter domains were constrained within the algorithm’s input specifications: the parameters
and
. All subsequent analyses of Lyapunov exponents and stability maps were performed within these bounds.
These parameter ranges were selected based on numerical exploration of the Lyapunov spectrum, ensuring sustained chaotic behavior and excluding stable or weakly chaotic regions. During encryption, all chaotic parameters are deterministically derived from the cryptographic key and constrained to these ranges by construction.
Figure 1 illustrates the system’s dynamic behavior and phase space distribution after a transient of
iterations. The system exhibits a dense occupation of the phase space, with trajectories that are not confined to simple attractors or periodic orbits, indicating fully developed chaotic dynamics. This dense cloud structure suggests ergodic mixing and an absence of dominant periodic regions. This behavior is advantageous for encryption, as minor variations in the initial parameters lead to unpredictable state evolutions.
The Lyapunov exponents were calculated using the QR method of Benettin [
21] over
iterations; see
Figure 2. The obtained values are
and
. Their sum is practically zero
, confirming volume conservation in the phase space and verifying that the map is area-preserving.
Both exponents show stable convergence, indicating a sustained chaotic regime without appreciable numerical drift. The positive value of
represents the exponential divergence of nearby trajectories, while the negative value of
corresponds to a complementary contraction, maintaining the conservative nature of the system. The presence of a positive Lyapunov exponent of considerable magnitude confirms the system’s capacity to generate highly divergent and unpredictable sequences, an essential quality for a cryptographically robust PRNG; see the repository [
22].
2.1.2. Parameter Space and Robust Chaos
Figure 3 presents a two-dimensional map of the Lyapunov exponent
, while
Figure 4 and
Figure 5 show one-dimensional cuts
and
, respectively, highlighting regions of chaos and stability. These results reveal extensive regions of sustained chaos, primarily for
and
, where
. The edges of these regions correspond to quasi-periodic or transitional zones where the system may temporarily exhibit regular behavior.
Figure 6 extends this analysis through an average stability map, where yellow-to-red tones identify the most chaotic configurations (redder indicates stronger chaos) and blue tones indicate ordered behavior. The predominance of red confirms the existence of robust chaos across wide parametric variations. This property is highly desirable for cryptographic applications, as it guarantees statistical independence between sequences generated under small perturbations of the control parameters, thereby ensuring a vast and reliable key space.
2.2. Generation of Encryption Chaotic Arrays
The encryption process begins with a user-defined key composed of 12 ASCII (American Standard Code for Information Interchange) characters (including uppercase/lowercase letters, numbers, and symbols). Each character is mapped to an integer value in the interval , providing an initial entropy of 96 bits. A key derivation function (KDF) is applied to transform the user key into a robust cryptographic seed for the chaotic process.
The implemented KDF is a PBKDF2-HMAC-SHA256 (Password-Based Key Derivation Function 2 with Hash-based Message Authentication Code using SHA-256), configured with 200,000 iterations and a derived key length of 256 bits. The iteration count was selected such that each password-guess attempt incurs a deliberately high computational cost; further increasing the number of iterations increases the computational cost per attempt but does not qualitatively change the security of the system for a fixed password entropy.
To reinforce the derivation process, a unique and deterministic salt is employed. The salt is formally defined as the concatenation of four user-provided character strings and an eight-character random sequence drawn from the printable ASCII set. This personalized and randomized design ensures that identical user inputs do not result in the same derived key. After construction, the salt is subjected to a redundancy check: if 50% or more of its characters are repeated, an additional random block is appended prior to invoking the KDF. This mechanism enforces a minimum diversity in the salt, prevents degenerate or low-entropy inputs, and is implemented directly within the MATLAB R2025b key-derivation routine (see the repository [
22]).
The KDF output (32 bytes, corresponding to 256 bits) is subsequently expanded into a sequence of 96 decimal digits through a deterministic digit-generation procedure based on arithmetic and bitwise operations. Specifically, the 256-bit output of PBKDF2-HMAC-SHA256 is interpreted as 32 bytes
, with
. From each byte
, three decimal digits
are deterministically generated using the following transformations:
where ⊕ denotes the bitwise XOR operation,
represents a left bit shift by three positions, and
denotes the floor function. This procedure yields a fixed-length sequence of exactly 96 decimal digits. These digits provide a deterministic and well-dispersed interface between the cryptographic key material and the chaotic domain. The resulting 96-digit sequence is divided into two independent blocks of 48 digits.
Each 48-digit block is then mapped to the parameters and initial conditions of the chaotic system according to the following assignment:
This mapping establishes a deterministic and entropy-amplified correspondence between the pair (user key and reinforced salt) and the parameters of the chaotic system. Using these parameters, the chaotic map defined in Equations (
1) and (
2) is iterated, and the first
t iterations are discarded as transient. The resulting sequence is sampled according to
where
J denotes the number of required samples, which depends on the target structure to be generated:
for the partition–permutation matrix in the confusion stage, and
for the diffusion matrix.
2.3. Mechanisms of Confusion and Diffusion
The image to be encrypted is an 8-bit grayscale image of size
pixels, as shown in
Figure 7. To ensure a comprehensive and statistically significant evaluation, encryption–decryption performance was tested on a set of 83 publicly available 8-bit grayscale images from the USC-SIPI database. This set includes 25 images from the misc volume (containing standard benchmarks, such as Lena and Baboon) and 58 images from the textures volume, thereby covering a diverse range of image contents and characteristics. Crucially, across all 83 test cases, the proposed scheme achieved perfect reconstruction, with a structural similarity index (SSIM) of exactly 1.0 for every decrypted image.
The encryption process consists of two consecutive stages: a confusion stage based on a partition–permutation mechanism, followed by a diffusion stage implemented through a modular operation.
2.3.1. Confusion Stage: Partition–Permutation Mechanism
The confusion process operates exclusively on pixel positions while preserving pixel intensities. Its objective is to reduce the strong spatial correlations present in the original image prior to the diffusion stage. This process is implemented through a partition–permutation (PP) matrix generated from a chaotic sequence. Using the first block of 48 digits of the encryption key, the parameters and initial conditions of the chaotic map are defined as described in
Section 2.2. The chaotic system is then iterated, the transient is discarded, and a chaotic sequence
is obtained. From this sequence
, the PP matrix of size
(with
) is constructed by extracting
consecutive samples and discretizing their values. The first
N discretized values populate the first row, defining the partition parameters
, while the remaining
N values populate the second row, defining the permutation indices
. Arranged column-wise, each pair
specifies one partition–permutation operation applied sequentially during the confusion stage.
The PP matrix, therefore, consists of two rows: the first row
determines the partitioning level of the image, while the second row
specifies the permutation applied within each partition. The PP matrix used in the illustrative example is shown in
Table 1.
For each column of the PP matrix, the pair
defines one complete partition–permutation operation. Given a value of
, the image is conceptually divided into a regular grid of
square regions. Each region has dimensions of
pixels, while the overall image size remains unchanged. Each region is further subdivided into four interior subregions of equal size, as illustrated in
Figure 8. These subregions are labeled according to their fixed spatial positions: 1 (top-left), 2 (top-right), 3 (bottom-left), and 4 (bottom-right). This labeling defines the initial (pre-permutation) configuration used in all subsequent permutation operations.
The permutation index
selects one fixed permutation pattern from a predefined lookup table consisting of 10 representative permutations chosen from the
possible arrangements. The permutation patterns used in this work are illustrated in
Figure 9 and are applied identically to all regions generated by the corresponding value of
. Each permutation specifies how the four labeled subregions are rearranged within each partition. For example, the permutation associated with
moves the subregion originally located at position 3 (bottom-left) to position 1 (top-left), shifts the subregion at position 1 to position 2, moves the subregion at position 2 to position 3, and leaves the subregion at position 4 unchanged. In this way, pixel values are preserved, while their spatial locations are permuted.
As an illustrative example, consider the first column of the PP matrix in
Table 1, where
. In this case, the image is divided into
square regions of
pixels. Each region is subdivided into four
subregions, labeled as in
Figure 8. The permutation pattern corresponding to
, shown in
Figure 9, is then applied identically to all regions.
The confusion process terminates after all partition–permutation operations specified in
Table 1 have been applied. The resulting image (
Figure 10) is referred to as the mixed matrix
X, which exhibits strong spatial decorrelation while preserving the original pixel intensities.
2.3.2. Diffusion Stage
The diffusion stage modifies pixel intensities to propagate small changes throughout the image. By using the next block of 48 digits in the key, distributed over the parameters of the chaotic functions, as specified in
Section 2.2, the diffusion matrix
Y is generated, which is the same size as the image illustrated in
Figure 7 (
pixels). The diffusion process is performed by means of a modular sum within the interval
, since both the mixed matrix
X and the diffusion matrix
Y have integer inputs within this interval when represented as an 8-bit grayscale image. The encrypted image
Z is obtained by a modular sum in
between the mixed matrix
X and the diffusion matrix
Y.
To execute the modular sum, the result is determined by the following rule:
if
, but
if
. This form of modular addition guarantees that the result will always remain within the same interval and can, therefore, be stored as an 8-bit grayscale image; this operation is reversible and allows the information
X to be recovered if the encrypted image
Z and the diffusion matrix
Y are available. The result of performing the modular addition between the mixed matrix
X and the diffusion matrix
Y, in our case, is the image illustrated in
Figure 11, which corresponds to the encrypted image
Z. For completeness and reproducibility, the detailed encryption algorithm is provided in
Appendix A, Algorithm A1.
2.4. Decryption of Information
To decrypt the information, the key (12 symbols + 4 words) must be known in order to generate the data table or PP matrix, in addition to the diffusion matrix. Once these two matrices are known, we begin by reversing the modular sum to recover the mixed matrix
X. Since both the diffusion matrix
Y and the encrypted information
Z are known, the next step is to perform the inverse operation of the modular sum, which is executed as follows: if
, then
, but if
, then
. In this way, the mixed matrix
X illustrated in
Figure 10 is recovered.
The next step is to reverse the confusion process, for which all partition and permutation steps given in
Table 1 must be reversed in an orderly manner, reversing all the permutation instructions in
Figure 9. The permutation reversal instructions are given in
Figure 12.
3. Results
All the results presented in this section were obtained using MATLAB using a custom code. The complete encryption procedure described in this work was then applied to the image shown in
Figure 7, to which the confusion and diffusion steps described in
Appendix A were applied, starting from the encryption key composed of 12 characters plus four words described in
Section 2.2. By using the 96 digits provided by this key, the PP and diffusion matrices were constructed, which led to the encrypted image illustrated in
Figure 10. Subsequently, the same key was used to decrypt the hidden image, reversing the diffusion and confusion steps. First, the scrambled matrix was recovered by applying the inverse operation of the modular sum detailed in
Appendix A. Then, the partition and permutation process was reversed, traversing Figure
12 from back to front until the original image was reached, which, in our case, was obtained using a structural similarity index measure (SSIM) equal to 1.0. The recovered image is illustrated in
Figure 13.
3.1. Encryption Features
One of the qualities that a well-encrypted image must have is its randomness, which must be reflected in several objectively measurable aspects, such as an entropy that tends to 8 for grayscale images stored at 8-bit depth or a uniform distribution of its pixel values. Additionally, a statistical analysis of the correlation between adjacent pixels can be performed. In our case, measuring the entropy of the encrypted image illustrated in
Figure 5 yields a value of
, which implies a high degree of randomness in the distribution of pixel values.
To compare this with other factors, the histograms of the original image can be compared with those of the encrypted image.
Figure 14 shows the histogram of the original image (seen in
Figure 7), which shows a non-uniform distribution that suggests the existence of recognizable patterns or characteristics in the image.
Figure 15 shows the histogram of the encrypted image (for the image in
Figure 7). The histogram of the encrypted image has a mean value of
and a flat or uniform distribution, meaning its pixel values appear with approximately the same frequency, which is evidence that there is no recognizable pattern that suggests any possibility of an attack on the encryption.
Another objective criterion is the evaluation of the correlation between adjacent pixels in the horizontal, vertical, and diagonal directions for the first of the four images in
Figure 7 (those in the other three are very similar).
Figure 16 shows the correlations between adjacent pixels, in which the tendency to plot along the diagonal means that the pixels have a similar value. In all three cases, the Pearson correlation coefficient
r tends to 1, implying a high positive correlation.
Figure 17 shows the correlation between adjacent pixels for the encrypted image, for which the coefficient
r tends to zero in all three directions.
3.2. Cryptanalysis
Entropy, as well as the pixel distribution, guarantees that any attack or attempt to decrypt the images cannot be based on simple statistical characteristics. To analyze the security of the proposed method, several proofs are performed.
3.3. Sensitivity Test
The sensitivity test consists of attempting to extract the images by making very small changes to the encryption key. These attempts are made by modifying all the parameters of the chaotic functions. The first case corresponds to introducing a small change of
to the seed
, for which the mixed image is illustrated in
Figure 18, and the final decrypted image is shown in
Figure 19.
By slightly modifying the parameter
to a very small value, such as
, of the encryption key, the mixed and decrypted images are obtained as images, as per
Figure A1a,b. By slightly modifying the parameter
, the images, as in
Figure A1c,d, are obtained.
Figure A2a,b show the result obtained by modifying the seed transient parameter
t in one step. Figure a corresponds to the mixed image obtained, while Figure b corresponds to the final decrypted image. Figure c,d show the mixed and final decrypted images obtained by slightly modifying (
) the seed parameter
k. Since the seed values corresponding to diffusion were modified in the previous analysis, the effect of modifying the parameters that only affect the confusion stage will be analyzed below, so that what is affected is the information-recovery process from the mixed matrix.
Figure 20 illustrates the effects of modifying the seed in its parameters
.
Figure 20a,
Figure 20b,
Figure 20c, and
k Figure 20d represent altering them by the same minimal quantities (
). In all cases, the impossibility of recovering the original images is observed.
To place the obtained security results in context, a comparison with representative state-of-the-art chaotic image encryption schemes is presented. The proposed method achieves encrypted-image entropy, adjacent-pixel correlation in the horizontal, vertical, and diagonal directions, and histogram uniformity results consistent with those reported in recent works on chaotic image encryption [
6,
10,
11,
12,
13,
18,
23,
24,
25]. In terms of reconstruction quality, while some approaches report imperfect recovery (e.g., SSIM = 0.95 in [
6]), the proposed scheme consistently achieves perfect reconstruction with SSIM = 1. Regarding computational performance, the encryption time of the proposed system (1.9 s) is lower than that reported in several state-of-the-art methods, such as those presented in [
13,
23]. Similarly, reported decryption times for benchmark images such as Lena range from several seconds to over ten seconds, depending on image size and algorithmic complexity [
10,
12,
24], whereas the proposed method achieves lower execution times under comparable conditions.
3.3.1. Numerical Stability and Chaotic Dynamics
Regarding sensitivity to initial conditions, the delta-kicked oscillator exhibits robust chaotic behavior under parameter variation, characterized by positive Lyapunov exponents and area-preserving dynamics. To demonstrate this sensitivity, a small A perturbation of
was applied to the initial state,
Figure 21. The resulting separation
grows approximately exponentially, with an average logarithmic slope of
. This result reveals an extreme sensitivity to initial conditions, consistent with the principle of chaotic dependence, whereby small changes in the initial key or in the control parameters (
k,
) lead to entirely different output sequences; see the repository [
22].
Comparisons performed under double, single, and quantized (fixed-point) arithmetic reveal that the chaotic dynamics persist with negligible precision loss,
Figure 22. The estimated Lyapunov exponent remains nearly constant (
), and no periodic cycles were observed within
iterations. These findings confirm that the generator maintains numerical stability and robustness, making it suitable for cryptographic applications. The pseudo-random sequences produced remain unpredictable, non-repetitive, and highly sensitive to minute variations in the key + salt.
3.3.2. Key Security and Brute Force Resistance
The security of the derived key was assessed both theoretically and experimentally. Key derivation employs PBKDF2-HMAC-SHA256 with a four-word salt and 200,000 iterations, ensuring uniform bit dispersion across the 256-bit output while preserving the input entropy. In large-scale simulations using randomly generated key–salt pairs (with 1000 iterations for computational tractability), no collisions were observed, and the empirical entropy was ≈ bits/byte, indicating an injective, collision-resistant mapping.
Theoretical brute force estimates produce infeasible attack times even for extreme adversarial capabilities: ∼ years at attempts/s, ∼ years at attempts/s, and ∼ years at attempts/s. PBKDF2’s iteration count adds substantial computational hardness to each guess, markedly slowing large-scale brute force campaigns. Although PBKDF2 does not increase the entropy of a human-chosen password, it greatly raises the cost per attempt; the public salt prevents reusable precomputation (e.g., rainbow tables), and if the salt is incorporated into the secret material, it will further enlarge the effective search space.
3.3.3. Resistance to Known-Plaintext and Chosen-Plaintext Attacks
The robustness of the proposed chaotic encryption scheme was evaluated under both known-plaintext (KPA) and chosen-plaintext (CPA) scenarios. In the KPA assessment, comparative analyses between the original and encrypted images confirmed complete statistical independence. Using identical keys and parameters, a plaintext–ciphertext pair was generated, and the effective diffusion mask was computed as , where C and P denote the ciphered and original images, respectively.
The Pearson correlation coefficient between plaintext and ciphertext pixels was
,
Figure 23, and local correlations over
sliding windows remained within
, confirming the absence of linear or structural dependencies. The diffusion mask histogram,
Figure 24, exhibited a uniform distribution over
, with a Shannon entropy of
bits/byte, near the theoretical limit of 8 bits/byte. These results demonstrate complete confusion and diffusion in the Shannon sense and validate the pseudo-randomness of the delta-kicked oscillator.
A chosen-plaintext attack was implemented using MATLAB routines developed for this study; see data availability. Six controlled input patterns with distinct spatial structures in the repository [
22] were encrypted under identical PBKDF2–HMAC–SHA256 parameters. For each case, the correlation between the estimated diffusion mask
M and its plaintext
P remained within the order of
, indicating negligible dependence. Even for structured or constant inputs, no deterministic features could be inferred from the ciphertext.
Together, these findings confirm that the proposed system maintains statistical independence between plaintext and ciphertext domains and is resistant to both known- and chosen-plaintext attacks. The modular diffusion and dual-seed key derivation ensure unpredictable, noise-like outputs even when the encryption algorithm is fully disclosed, thus satisfying Shannon’s secrecy criterion.
3.3.4. Differential Attack and NPCR–UACI Metrics
A classical way to evaluate the security of an image encryption algorithm is by testing its ability to propagate small variations in the plaintext across the entire ciphertext. This property, known as diffusion, is quantitatively assessed using the standard metrics NPCR (Number of Pixels Change Rate) and UACI (Unified Average Changing Intensity). These measures evaluate the system’s sensitivity to minute perturbations under identical key and salt conditions.
In this stage, differential tests were conducted using a custom MATLAB routine (NPCR_UACI_final.m, see Data Availability) implementing the complete encryption scheme. For each trial, two
images differing by only one pixel (
) at random positions were encrypted using the same key derived via PBKDF2–HMAC–SHA256, ensuring identical chaotic sequences and diffusion masks. The individual and mean results for five encryption trials are summarized in
Table 2. The average NPCR value of
indicates that modifying a single pixel in the plaintext image changes more than
of the ciphertext pixels, demonstrating excellent global diffusion. Similarly, the UACI value of
, very close to the theoretical optimum of ≈33.33% for 8-bit images, confirms that the intensity variations in the encrypted image are uniform and statistically balanced.
These results are in line with those reported in previous studies on chaotic encryption, indicating that the proposed modular sum diffusion mechanism provides strong diffusion capability. The mechanism, controlled by the pseudo-random sequence generated through the CPMfun function (see Data Availability), further validates the robustness of the proposed approach. Overall, the findings confirm that the encryption method satisfies Shannon’s second condition of complete diffusion. The combination of the chaotic map and the key derived via the KDF ensures efficient information dispersion, making the system highly resistant to differential attacks and exhibiting error-propagation behavior consistent with modern cryptographic systems.
From a practical perspective, runtime performance was also evaluated. Experimental tests confirm that the proposed system is viable for practical use. The complete encryption and decryption of four images requires approximately 10 s on a standard laptop computer (Intel Core i7, 16 GB RAM, 1.4 GHz), including user interaction, while the pure computational runtime (excluding manual input) is approximately s on the same device. These results indicate that the additional computational cost—particularly that introduced by key derivation—is acceptable for practical deployment while significantly strengthening the security of the system.
4. Conclusions
In this work, an image encryption mechanism that combines the strength of the deterministic dynamics of chaotic delta-kicked oscillator-type functions with a key derivation function is presented. By integrating PBKDF2-HMAC-SHA256 with a personalized four-word salt, the system transforms human-readable passwords into 256-bit entropy sources, ensuring unique seeds for every execution. The dual-block design of 96 digits effectively decouples confusion and diffusion, producing independent chaotic sequences. The experimental results confirm statistical uniformity (entropy ), near-zero correlations, and full diffusion (NPCR , UACI ). The recovered image exhibits no degradation, achieving a structural similarity index (SSIM) of . Sensitivity and cryptanalysis tests, both known- and chosen-plaintext attacks, demonstrate resistance to differential and structural attacks. The model maintains compatibility with standard MATLAB arithmetic and achieves reversibility with minimal numerical drift.
At the same time, the current approach presents some limitations. The overall security of the scheme ultimately depends on the entropy of the user-provided inputs, since the key derivation function increases the computational cost of attacks but does not increase the intrinsic entropy of weak passwords. Future work may therefore consider integrating system-enforced entropy controls or complementary input-hardening mechanisms to further mitigate this limitation. In addition, the present implementation has been validated only for grayscale images of fixed size and has not yet been evaluated on large-scale image datasets. The next step is to fully develop the adaptability of the image encryptor and validate it for RGB images of any size. Additional analyses can also be included, such as extension to multidimensional chaotic maps to increase parallel performance. The validation results should ultimately lead to an application that functions as a high-security image encryptor, beneficial to any user, and is computationally efficient as a modern, privacy-preserving image encryption system.