How do I get the least significant bit of a character and hide it in an image file? [closed]

-1

The program that checks if a particular LSB has changed, how to proceed?

    
asked by anonymous 06.06.2017 / 15:55

1 answer

2

You're wrapped up in the concept of steganography. Let me try to explain a little here, and with that you should understand enough to start an implementation:

First, an image can be understood as a sequence of (height × width) pixels, each of which is an integer that encodes clarity (in the case of a grayscale image) or the intensity of red, green and blue of each pixel.

Note that since there are many (at least 256) possible values for the intensity of each pixel (or each RGB component of each pixel), the difference between two neighboring values is very small, and practically imperceptible when the pixel is rendered. So if that last least significant bit of the pixel / component is zero or one, someone seeing the image will not realize the difference. So you can hide a die in these less significant bits without someone who does not know what's happening notice.

Then take your message, and see it as a sequence of bits. For example, the string "Wikipedia%code%" is seen as the string

0111 0111 0110 1001 0110 1011 0110 1001 0111 0000
0110 0101 0110 0100 0110 1001 0110 0001 0000 0000

(note the byte zero to mark the end of the message).

Then you get each of these 80 bits and hide, in order, the least significant bits of the first 80 pixels (or the first 80 pixels) of your image.

See if you can understand well enough what you need to do so you can ask more specific questions and post some code according to the site rules.

    
08.06.2017 / 20:21