The Reincarnation of Grille Cipher: A Generative Approach

Jia Liu, Yan Ke, Lei Yu, Jun Li, Yaojie Wang, Yiliang Han, Minqing Zhang, Xiaoyuan Yang

Abstract

In order to keep data secret, various techniques have been implemented to encrypt and decrypt secret data. Cryptography is committed to the security of content, ensuring it cannot be restored from a given ciphertext. Steganography aims to hide the existence of a communication channel within a stego. However, it has been difficult to construct a cipher that simultaneously satisfies both channel and content security for secure communication. Inspired by the Cardan grille, this paper presents a new generative framework for a grille cipher. A digital Cardan grille is used for message encryption and decryption. The ciphertext is directly sampled by a powerful generator without an explicit cover. Message loss and prior loss are proposed for penalizing message extraction error and unrealistic ciphertext. Jensen-Shannon Divergence is introduced as a new criterion for channel security. A simple practical data-driven grille cipher is proposed using semantic image inpainting and generative adversarial networks (GANs). Experimental results demonstrate the promise of the proposed method.

1. Introduction

Traditional secure communication often separates cryptography (content security) from steganography (channel security). Conventional steganography typically relies on "cover modification," where an existing file is subtly altered to embed data. However, these modifications often leave statistical traces that modern steganalysis tools can detect.

The historical Cardan Grille, which served as the inspiration for this modern generative approach.

To address this, researchers have looked back to the 16th-century Cardan Grille—a physical mask used to hide secret words within a mundane letter. By modernizing this concept through deep learning, the authors propose a generative cipher that synthesizes secret-carrying images from scratch, ensuring that the hidden message is an inherent part of the data distribution rather than a modification of it.

2. The Generative Cipher Framework

The proposed system moves away from modifying existing covers and instead focuses on generating a brand-new "stego" image that appears natural to both humans and machines. The framework is built upon three primary components:

  1. Digital Cardan Grille: This serves as the symmetric key ($C_k$), a binary mask shared between the sender and receiver that specifies which pixels or bit planes will contain the secret message.
  2. Semantic Image Inpainting: Using a Generative Adversarial Network (GAN), the sender takes a "corrupted" image (where secret bits occupy the grille's holes) and fills in the remaining pixels to create a realistic sample from a target dataset, such as human faces.
  3. Constrained Optimization: The generator is guided by three loss functions: Contextual Loss (maintaining consistency with uncorrupted parts), Perceptual Loss (ensuring realism via a discriminator), and Message Loss (minimizing extraction errors at the grille locations).
The proposed framework for message encryption and decryption using a generative model and a shared key.

3. Experimental Results and Analysis

The framework was evaluated using the Labeled Faces in the Wild (LFW) dataset, with a DCGAN model trained on 12,000 face images.

3.1 Message Recovery and Bit Plane Stability

A key finding was the impact of bit plane selection on message integrity. Because GANs are inherently noisy generators, lower bit planes (Least Significant Bits) fluctuated significantly during synthesis, leading to high error rates. However, the authors found that embedding messages in higher bit planes (MSB)—specifically Bit Plane Index (BPI) $\ge$ 3—resulted in near-perfect recovery. At BPI 8, the system achieved 100% decryption accuracy.

3.2 Security and Steganalysis Resistance

To measure channel security, the authors introduced Jensen-Shannon Divergence (JSD) to quantify how closely the ciphertext distribution matches real-world data. When tested against state-of-the-art steganalyzers like SPAM and SCRMQ1, the generative approach significantly outperformed traditional methods like HUGO and HILL. Because there is no "original" cover image to compare against, the generated images lack the typical noise artifacts that steganalysis tools seek.

4. Conclusion and Future Work

The generative grille cipher represents a significant step toward unifying content and channel security. By synthesizing data rather than modifying it, the method bypasses the fundamental logic of traditional steganalysis. While current results using $64 \times 64$ images are promising, future work will explore higher-resolution generators like StyleGAN and more efficient key management for the digital grille masks to enhance both the visual realism and the practical scalability of the system.

Summary updated

Abstract

In order to keep the data secret, various techniques have been implemented to encrypt and decrypt the secret data. Cryptography is committed to the security of content, i.e. it cannot be restored with a given ciphertext. Steganography is to hiding the existence of a communication channel within a stego. However, it has been difficult to construct a cipher (cypher) that simultaneously satisfy both channel and content security for secure communication. Inspired by the Cardan grille, this paper presents a new generative framework for grille cipher. A digital cardan grille is used for message encryption and decryption. The ciphertext is directly sampled by a powerful generator without an explicit cover. Message loss and prior loss are proposed for penalizing message extraction error and unrealistic ciphertext. Jensen-Shannon Divergence is introduced as new criteria for channel security. A simple practical data-driven grille cipher is proposed using semantic image inpainting and generative adversarial network. Experimental results demonstrate the promising of the proposed method.
BibTeX
@misc{liu2018reincarnation,
  author = {Jia Liu and Yan Ke and Lei Yu and Jun Li and Yaojie Wang and Yiliang Han and Minqing Zhang and Xiaoyuan Yang},
  title = {{The Reincarnation of Grille Cipher: A Generative Approach}},
  year = {2018},
  eprint = {1804.06514},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1804.06514},
}
Figure