Back to hide an image Back to recover an image

Web-Based Prototype

Our web-based prototype allows a user to hide an image in a given cover image and to recover a hidden secret. The general framework of the prototype is implemented using the scripting language PHP (about 1000 lines of code). On user interaction, the prototype executes a C-program responsible for encoding and decoding a secret and a Perl script which embeds or extracts the compressed bit stream into the cover image.

The start page of our prototype can be reached via browser under A user can hide as well as recover a secret image by following the respective links. Whenever a user enters one of the two pages, a new session is started. This allows different users to use the prototype at the same time. Each session timeouts after 15 minutes, provided the user does not use the prototype during this time. All user created data is then deleted.


By following the link "Hide!" the user can access the hiding web page. This page shows two color example images, one of which is proposed as secret and one is designated to be the cover. The user can upload any other valid image to this web page. That means any common image format such as PNG, JPEG, PGM/PPM is possible. However, the file size is limited by 5 megabytes, and the image resolution has to be less or equal than 768 x 768 pixels and larger or equal than 32 x 32. For further processing, the prototype converts any format to the lossless portable pixmap format (PGM/PPM). Moreover, for showing the images in the browser, we convert any image to the PNG format. The images shown on the hiding page are scaled to a width of 350 pixels for visualization purposes. By clicking on any image, the user receives the image in its original size. Clicking on the image again leads the user back to the hiding page.

To hide the secret image in the cover image, the user simply presses the button "Start hiding *". This applies our compression program on the secret using a compression ratio so that it fits to the space provided by the cover. Note that the reconstruction quality of the recovered secret later on is depending on the used compression ratio, which depends again on the image dimensions and number of color channels of cover and secret image. The larger the cover and the smaller the secret, the higher the quality of the reconstruction. As soon as encoding has finished, the server embeds the received bit stream.

During the hiding process, the hiding page reloads every second to prevent browser timeouts. Moreover, the user can abort the process by clicking on "Stop hiding!" if he/she wishes to do so. Otherwise, the user receives the inpainting mask (left side) showing the position of the stored pixels (black on white) and the covered secret (right side). The user can now store the covered secret. Alternatively one can load the obtained secret immediately to the recovering page by following the link "Recover this secret?" given below the covered secret.

There are two additional options available for hiding. For security reasons, it is desirable to keep the amount of secret bits as small as possible. Hence, a user can choose between three different quality levels corresponding to different compression ratios, respectively. "High" uses the minimal possible compression ratio such that the coded image still fits in the available space. "Medium" uses twice the compression ratio and "low" even uses a ratio five times larger than the smallest possible ratio.

The second option is the possibility to specify an alpha-numeric password with a length of 0 to 32 characters, used by our embedding method to encrypt the encoded secret.


The recovering page allows to recover a secret that was previously hidden by our steganography method. The covered secret is depicted on the left side of the recovering web page. As long as the user does not upload a covered secret, a default example is depicted. It contains a secret which was previously hidden using the password "knife" and the quality setting "low". To recover the secret, one has to enter the password into the corresponding input field. Then the user has to decide between two possible approaches for recovering. Any of those first extracts the embedded bit stream, which contains the encoded secret. The button "Instant recovering (fast)" starts a fast implementation of the decoding process of our codec. In contrast, the button "Step by step recovering (slow)" shows step by step the evolution of the diffusion reconstruction process. This takes longer than the instant reconstruction but is visually much more appealing. During recovering, the page (as for hiding) is reloading every second. The user can abort the recovery process at any time. Finally the recovered secret appears on the web page.

As on the hiding page the user can click on images to get unscaled versions. This is also possible for the evolving image.
Back to hide an image Back to recover an image Back to MIA page
Imprint - Data protection