Image Steganography [closed]
Asked Answered
S

4

9

I'm working on Steganography application. I need to hide a message inside an image file and secure it with a password, with not much difference in the file size. I am using Least Significant Bit algorithm and could do it successfully with BMP files but it does not work with JPEG, PNG or TIFF files. Does this algorithm work with these files at all? Is there a better way to achieve this? Thanks.

Shonda answered 9/5, 2010 at 15:39 Comment(3)
Related question that might help: #1216656Besprinkle
It's much more difficult with lossy compressed formats, because lossy image compression is specifically designed to reduce the fidelity of image detail that is difficult to perceive, which is precisely where steganographic techniques want to put their information. Lossless compression is also problematic, as introducing new information typically reduces the efficiency of the compression, increasing file size.Araujo
PNG is lossless. And JPEG can be lossless. There used to be an example of this at stega.maxant.co.uk, but it seems to be offline at the moment.Dithyrambic
A
8

This heavily depends on the way the particular image format works. You'll need to dive into the internals of the format you want to use.

For JPEG, you could fiddle with the last bits of the DCT coefficients for each block.

For palette-based files (GIFs, and some PNGs), you could add extra colours to the palette that look identical to the existing ones, and encode information based on which one you use.

Auxochrome answered 9/5, 2010 at 15:43 Comment(0)
C
2

You'll have to distinguish between pixel-based (Bitmap) and palette-based formats (GIF) for which the steganographic technique is quite different. Also be aware that there are image formats like JPG that lose information in the compression process.

I'd also advice some general introduction to steganography including different formats.

Concourse answered 9/5, 2010 at 17:57 Comment(0)
B
0

Least Significant Bit approach does not work with JPEG and GIF images because you are using the pixel data (raw image) to store hidden information before compression. A pixel p, with data 0x123456 will probably not have this value after compression because its value depends on the compression rate and neighbour pixels. In this case we are talking about algorithms that does not only compact the image (like a ZIP, that keeps the content), but changes the color distribution, texture, and quality in order to decrease the number of bits to represent it.

However, PNG can be used just to compact the image in the same sense of ZIP file, keeping the content. Therefore, you can use the Least Significant Bit for PNG images, so that Wikipedia Steganography page shows example in this format.

Breast answered 29/9, 2013 at 9:6 Comment(0)
B
0

As long as the image format is lossless, you can use the LSB steganography in pixels (BMP, PNG, TIFF, PPM). If it is lossy, you have to try something else, as compression and subsequent decompression cause small changes in the pixels and the message is gone. In GIF, you can embed your message into the palette. In JPEG you change the DCT coefficients, a low-level frequency representation of the image, which can be read from and saved as JPEG file losslessly.

There is an extensive research on steganography in JPEG. For introduction, I personally recommend Steganography in Digital Media: Principles, Algorithms, and Applications by Jessica Fridrich - must-read material for serious attempts in steganography. The approaches for various image formats are discussed in-depth there.

Also, LSB is inefficient and very easily detectable, you should not use that. There are better algorithms, however usually heavy on math and complex. Look for "steganography embedding distortion" and "steganography codes".

Bolero answered 13/10, 2022 at 19:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.