Clear Sky Science · en

Reversible medical image cryptography using spatial XOR-rotation and chaos-driven permutation and diffusion schemes

· Back to index

Why locking medical images matters

As hospitals embrace telemedicine, cloud archives, and AI diagnostics, vast numbers of medical images now travel across networks and sit on remote servers. These pictures—brain scans, X‑rays, biopsy slides—can reveal a person’s identity and health status in intimate detail. Protecting them is therefore both a privacy and safety issue. Yet many existing security tools were not designed with medical images in mind: they may be too slow for real‑time use, too complex for small devices, or they may subtly alter pixel values, which is unacceptable when doctors rely on every shade of gray for diagnosis.

A lighter lock built for hospital workflows

This study introduces two new ways to scramble medical images so thoroughly that they look like random noise to outsiders, while remaining perfectly reversible for authorized staff. The ciphers—named SPiRAL and CHRONEX—are designed to work directly on the pixels that form the image, instead of relying on heavy mathematical transforms or public‑key operations. That design choice keeps computation light and helps them run on everything from bedside scanners to hospital servers. Both methods are fully lossless: when a clinician decrypts an image using the correct secret key, every single pixel returns exactly to its original value.

Figure 1
Figure 1.

How the first method reshuffles close neighbors

SPiRAL focuses on speed and simplicity. It walks along each row and column of the image and links neighboring pixels using a basic bitwise operation (XOR). In practice, that means each pixel’s value is mixed with the values of all the pixels before it, creating a strong chain of dependence: changing one pixel in the original image cascades through many pixels in the encrypted one. After this mixing step, SPiRAL rotates rows and columns by different amounts, depending on their position, further breaking up recognizable patterns while still operating with very cheap integer operations. Finally, the image is flattened into a long list of pixels, shuffled using a key‑driven random order, and masked once more. These layers together produce an output that visually resembles static but can be reversed exactly if, and only if, the same secret key is used.

How the second method adds chaos and deeper mixing

CHRONEX is designed for situations where the threat level is higher and a bit more computation is acceptable. Instead of focusing only on local neighbors, it uses ideas from chaos theory to reorder the entire image globally. A pair of simple chaotic formulas generate a seemingly unpredictable sequence that determines a new position for every pixel, effectively scattering all parts of the image. On top of that, CHRONEX applies a custom substitution table and another chain of XOR operations that depend not just on the current pixel and the key, but also on the previous encrypted pixel. This feedback loop means that even tiny changes in the original image or the secret key ripple across the entire encrypted picture, making it extremely difficult for an attacker to trace the transformations.

Putting the new locks to the test

The authors tested both schemes on 115 medical images, including standard grayscale scans and color cancer images. They examined how well the encrypted images hide the original brightness patterns (using entropy), how strongly a one‑pixel change affects the whole result (NPCR and UACI measures), and how much neighboring pixels in the cipher still resemble each other (correlation). For both SPiRAL and CHRONEX, the entropy of the encrypted images was almost the theoretical maximum, neighbor correlations shrank to values close to zero, and small changes in either the image or the key altered nearly every encrypted pixel. Statistical tests against several recent competing methods showed that the new ciphers usually match or outperform existing schemes, with CHRONEX in particular delivering the strongest signs of randomness and resistance to attack, albeit with slightly higher run time.

Figure 2
Figure 2.

What this means for future digital care

In plain terms, the study shows that it is possible to protect medical images very effectively without slowing down clinical work or compromising the fine detail doctors rely on. SPiRAL offers a fast, lightweight lock suitable for devices at the edge of the network, such as scanners, wearables, and viewing terminals. CHRONEX provides a tougher lock, well‑suited for long‑term storage, cross‑hospital sharing, or cloud‑based analysis where the risk of eavesdropping is greater. Because both methods are fully reversible and tailored to the pixel structure of images, they can slot into existing medical systems while keeping patients’ visual data confidential from acquisition to archive.

Citation: Sundeep, D., Umadevi, K., Bugge, B.P. et al. Reversible medical image cryptography using spatial XOR-rotation and chaos-driven permutation and diffusion schemes. Sci Rep 16, 12536 (2026). https://doi.org/10.1038/s41598-026-41579-z

Keywords: medical image encryption, telemedicine security, chaotic cryptography, reversible image cipher, health data privacy