13-03-2012, 02:41 PM
steganography
[attachment=18261]
Overview:
People use cryptography to send secret messages to one another without a third
party overseeing the message. Steganography is a type of cryptography in which
the secret message is hidden in a digital picture. Think of all those pixels in an
image and each pixel has three color numbers — there are zillions of numbers
in an image. If you were to change a few of these color numbers the resulting
picture would probably look a lot like the original image; in fact, most people
probably couldn’t tell that you had changed the image at all. Steganography works
by changing a few pixel color values; we will use selected pixel values to represent
characters instead of a color value.
Interaction
• Prompt the user if they want to encode or decode a message.
• Use the FileChooser dialog to prompt the user for an input file.
• If encode, prompt the user for an input message. Encode the message into
the picture (details below). Then use the FileChooser dialog to prompt the
user for an output file. Save the new picture/message in this file (using bmp
format).
• If decode, extract the message from the file. Print the message.
Encoding/Decoding Method
• You can extract the pixels of your target picture in one big array using the
textttgetPixels() method.
• Use the first pixel (at spot 0) to hide the length of your message (number of
characters). You will limit yourself to messages that are between 0 and 255
characters long.
• After that use every eleventh pixel to hide characters in your message. Start
at pixel 11, then pixel 22, and so on until you hide all characters in your
message.
Hiding Method
The problem with changing the red values in our encode/decode steps, is that
these often cause quite visible changes in the resulting image. This is especially
true if the pixels that are being changed are part of a large section of uniformly
colored pixels – the ”dots” stand out and are noticeable. As an option, we can
change only the lower order bits of each pixel color (red, blue, and green). This
will make subtle changes to each pixel’s color and will not be as evident.
[attachment=18261]
Overview:
People use cryptography to send secret messages to one another without a third
party overseeing the message. Steganography is a type of cryptography in which
the secret message is hidden in a digital picture. Think of all those pixels in an
image and each pixel has three color numbers — there are zillions of numbers
in an image. If you were to change a few of these color numbers the resulting
picture would probably look a lot like the original image; in fact, most people
probably couldn’t tell that you had changed the image at all. Steganography works
by changing a few pixel color values; we will use selected pixel values to represent
characters instead of a color value.
Interaction
• Prompt the user if they want to encode or decode a message.
• Use the FileChooser dialog to prompt the user for an input file.
• If encode, prompt the user for an input message. Encode the message into
the picture (details below). Then use the FileChooser dialog to prompt the
user for an output file. Save the new picture/message in this file (using bmp
format).
• If decode, extract the message from the file. Print the message.
Encoding/Decoding Method
• You can extract the pixels of your target picture in one big array using the
textttgetPixels() method.
• Use the first pixel (at spot 0) to hide the length of your message (number of
characters). You will limit yourself to messages that are between 0 and 255
characters long.
• After that use every eleventh pixel to hide characters in your message. Start
at pixel 11, then pixel 22, and so on until you hide all characters in your
message.
Hiding Method
The problem with changing the red values in our encode/decode steps, is that
these often cause quite visible changes in the resulting image. This is especially
true if the pixels that are being changed are part of a large section of uniformly
colored pixels – the ”dots” stand out and are noticeable. As an option, we can
change only the lower order bits of each pixel color (red, blue, and green). This
will make subtle changes to each pixel’s color and will not be as evident.