Revealing Encoded Images Using a Generative Adversarial Network
Marcial Bonilla-Marín, José Tuxpan-Vargas, E. Campos-Cantón · Mathematics · 2025
In this work, we address a special challenge for a generative adversarial network, which is to reveal images encoded using dynamic S-boxes based on a cryptographically secure pseudo-random number generator. S-boxes are generated by the logistic function with two time series with delays, resulting in a robust coding. A conditional generative adversarial network (cGAN) designed for image translation is used. Experiments were performed on datasets where image intensity levels varied between 256, 128, 64, 32, and 16 while keeping the image size constant. The main findings can be summarized as follows: a cGAN can be trained to reveal images encoded by S-boxes; the quality of the translated images improves as the number of intensity levels decreases, with images with 16-intensity levels being the sharpest and sharpness decreasing as intensity levels increase; and in an experiment where the input and output images were reversed, cGAN was found to learn to encode images according to the S-boxes method. It was found that a double translation, consisting of first encoding a real image by the reverse experiment and then a second translation to reveal the encoded image, recovered the original image. The translated training and test images resulting from these experiments were evaluated using binary analysis and metrics derived from the confusion matrix.