Using a steganographic algorithm like least significant bit, can one hide a text in an image and then hide that image in another image?
closed as off-topic by e-sushi, AleksanderRas, Maarten Bodewes♦ Apr 26 at 15:49
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Programming questions are off-topic even if you are writing or debugging cryptographic code. Unless your question is specifically about how the cryptographic algorithm, protocol or side-channel (mitigation) works, you should look into asking on Stack Overflow instead." – e-sushi, AleksanderRas
For bitmap images, if you use all the pixels of the image (bad idea, it's very detectable) you need a first image 8/3 times bigger than the size of the text you want to hide (you can compress it).
- 8 because you need 8 pixels to hide one byte (one bit per pixel).
- 1/3 with color images, because you can hide a bit per channel/pixel.
After this, you can hide this image into another image 8 times bigger (again, 1 byte into 8 pixels).
For JPEG images the approach is different, because you are hiding information into the DCT coefficients. But it's the same idea.