A new image encryption algorithm based on the OF-LSTMS and chaotic sequences

Yi He, Yingqian Zhang, Xin He, Xingyuan WangScientific 2021

Abstract

In this paper, a novel image encryption algorithm based on the Once Forward Long Short Term Memory Structure (OF-LSTMS) and the Two-Dimensional Coupled Map Lattice (2DCML) fractional-order chaotic system is proposed. The original image is divided into several image blocks, each of which is input into the OF-LSTMS as a pixel sub-sequence. According to the chaotic sequences generated by the 2DCML fractional-order chaotic system, the parameters of the input gate, output gate and memory unit of the OF-LSTMS are initialized, and the pixel positions are changed at the same time of changing the pixel values, achieving the synchronization of permutation and diffusion operations, which greatly improves the efficiency of image encryption and reduces the time consumption. In addition, the 2DCML fractional-order chaotic system has better chaotic ergodicity and the values of chaotic sequences are larger than the traditional chaotic system. Therefore, it is very suitable for image encryption. Many simulation results show that the proposed scheme has higher security and efficiency comparing with previous schemes.

Introduction

In the era of big data, image security is paramount. However, images are computationally "heavy" carriers. Traditional encryption usually relies on two distinct, sequential stages: permutation (shuffling pixel positions) and diffusion (altering pixel values). This sequential approach is often computationally expensive and slow, especially for high-resolution images. Furthermore, many existing chaotic encryption schemes utilize simple maps that possess "periodic windows" or small key spaces, making them vulnerable to brute-force or differential attacks. This research addresses these bottlenecks by merging the structural memory of deep learning with the unpredictability of chaos theory.

The OF-LSTMS Architecture

The core of the proposed method is the Once Forward Long Short-Term Memory Structure (OF-LSTMS). While standard LSTMs are designed for learning patterns via training, encryption requires a process that is perfectly reversible and high-speed. The authors modified the standard LSTM by replacing complex matrix multiplications and non-linear activations with XOR and MOD operations. This ensures that the encryption process is mathematically reversible for decryption without information loss.

The overall architecture of the Once Forward Long Short-Term Memory Structure (OF-LSTMS) across multiple time steps.

As shown in the architecture, the image is processed as a sequence. The "Once Forward" designation refers to the fact that the image only needs a single pass through the network to be fully encrypted. The internal gates of the OF-LSTMS—the input gate (I), output gate (O), and memory unit (C)—are initialized using chaotic sequences.

Internal structure of an OF-LSTMS cell showing the input, output, and memory gates used for simultaneous permutation and diffusion.

By using the LSTM's hidden state ($C_t$), the encryption of the current pixel is inherently tied to all previous pixels in the sequence. This provides built-in, high-quality diffusion. Simultaneously, the block-based processing effectively scrambles pixel positions, achieving synchronous permutation and diffusion.

Chaotic Sequence Generation

To provide the necessary randomness, the algorithm employs a Two-Dimensional Coupled Map Lattice (2DCML) based on fractional-order calculus. This system is significantly more complex than standard chaotic maps, offering superior ergodicity and a much larger key space. Moving to fractional-order chaos adds extra parameters (such as the derivative order $\alpha$), which exponentially increases the difficulty for an attacker attempting to guess the secret key.

Experimental Results

The proposed scheme was evaluated using standard benchmarks from the USC-SIPI image database, including grayscale and color images (e.g., Boat, Pentagon, Baboon). Key results include:

  • Security: The key space exceeds $2^{425}$, rendering brute-force attacks impossible with current hardware.
  • Statistical Resistance: Information Entropy was consistently $\approx 7.999$, indicating nearly perfect randomness. Adjacent pixel correlation dropped from $\approx 0.9$ in plain images to $\approx 0.001$ in encrypted ones.
  • Efficiency: The average encryption time was 0.925 seconds, significantly faster than comparable methods which ranged up to 2.44s.
  • Robustness: The algorithm successfully decrypted images even after 5% "salt and pepper" noise corruption or 25% data loss (occlusion attack).

Conclusion

By reimagining the LSTM as a cryptographic engine, this research provides a high-speed, secure alternative to traditional sequential encryption. Future work will focus on optimizing the OF-LSTMS for hardware acceleration on FPGA/ASIC platforms and exploring its application in real-time video encryption, where temporal redundancy presents additional security challenges.

Summary updated

BibTeX
@inproceedings{he2021new,
  author = {Yi He and Yingqian Zhang and Xin He and Xingyuan Wang},
  title = {{A new image encryption algorithm based on the OF-LSTMS and chaotic sequences}},
  booktitle = {Scientific},
  year = {2021},
  doi = {10.1038/s41598-021-85377-1},
}
Figure