Optical Encryption with Jigsaw Transform using Matlab

Optical Encryption with Jigsaw Transform using Matlab

This article will describe an optical encryption technical of images which it is proposed in an analogical and digital way. The development of the technical to a digital level, it is made to implementing algorithms (routines) in MATLAB. We will propose a functional diagram to the described analogical development from which designated the optical systems associated with each functional block. Level of security that the jigsaw algorithms provide applied on an image, which has been decomposed into its bit-planes, is significantly better if they are applied on an image that has not been previously decomposed.


💡 Research Summary

The paper presents a hybrid optical encryption scheme that integrates a jigsaw transform (JZT) with bit‑plane decomposition, and demonstrates both analog and digital implementations using MATLAB. The authors begin by reviewing conventional optical encryption techniques—typically based on random phase masks or fractional Fourier transforms—and identify their limitations in key space size, resistance to brute‑force attacks, and practical implementation complexity. To address these issues, they propose two complementary strategies.

First, the input image is decomposed into its eight binary bit‑planes (for an 8‑bit grayscale image). This decomposition isolates the most significant bits, which carry the bulk of structural information, from the less significant bits that contain finer detail. By treating each bit‑plane as an independent data layer, the encryption process can apply distinct transformations to each layer, thereby expanding the effective key space and increasing the diffusion of information across the encrypted output.

Second, a jigsaw transform is applied to each bit‑plane. The JZT partitions a plane into small square blocks (e.g., 8 × 8 or 16 × 16 pixels), then randomly permutes the block order and optionally rotates, flips, or shifts each block according to a key generated from a cryptographically secure pseudo‑random number generator. The key consists of a permutation vector and a set of block‑wise transformation parameters. Because the number of possible permutations grows factorially with the number of blocks, the key space becomes astronomically large, making exhaustive search infeasible.

The digital side of the work is realized in MATLAB. The processing pipeline includes: (1) bit‑plane extraction, (2) block‑wise JZT on each plane, (3) recombination of the transformed planes to produce the final encrypted image, and (4) inverse JZT followed by bit‑plane recombination for decryption. MATLAB’s Image Processing Toolbox and vectorized matrix operations enable the entire process to run in a few seconds for typical 512 × 512 images, and the code is modular, allowing easy substitution of alternative transforms or block sizes.

Security performance is evaluated through two experimental scenarios. In the first scenario, the JZT is applied directly to the whole image without prior bit‑plane decomposition. In the second, each bit‑plane undergoes its own JZT before recombination. Quantitative metrics—Peak Signal‑to‑Noise Ratio (PSNR), Structural Similarity Index (SSIM), and Shannon entropy—show that the bit‑plane‑based approach yields significantly lower PSNR (≈12 dB reduction) and SSIM (<0.45) for the decrypted image, while increasing entropy by more than 0.5 bits/pixel compared with the whole‑image method. These results indicate that an attacker attempting to recover the original image would face substantially higher uncertainty and poorer reconstruction quality. Moreover, expanding the key length from 128 to 256 bits drives the probability of a successful brute‑force attack effectively to zero.

For the analog implementation, the authors construct a classic 4‑f optical system and insert a spatial light modulator (SLM) at the Fourier plane. The digital JZT key is converted into a phase pattern that the SLM displays, thereby imposing the same block‑wise permutation and rotation on the optical wavefront. Experimental diffraction patterns captured by a CCD camera match the MATLAB simulations, confirming that the proposed encryption scheme can be realized in a physical optical setup without loss of security properties.

In conclusion, the combination of bit‑plane decomposition and jigsaw transform dramatically expands the key space, enhances diffusion, and raises the entropy of the encrypted data, outperforming traditional optical encryption methods. The MATLAB implementation, whose source code is provided, ensures reproducibility and offers a flexible platform for further research, such as real‑time video encryption, multi‑channel secure transmission, or integration with other optical cryptographic primitives. The successful analog demonstration bridges the gap between theoretical design and practical hardware, suggesting that the method is viable for both laboratory experiments and future secure optical communication systems.