04-08-2012, 02:25 PM
A NEW AND SECURE INFORMATION HIDING SYSTEM USING CRYPT-STEGANOGRAPHY
BTP Steganography.pptx (Size: 1.17 MB / Downloads: 46)
Scope Of Image Steganography
Steganography is the technique for hiding information in images.
Cryptic messages are further hidden in images thereby further encrypting them and making them invisible altogether.
One of its various application is in Digital Watermarking.
Hacking of information online and use of images by terrorists make steganography and steganalysis very relevant fields to research on.
Applying RSA algorithm and LSB algorithm for crypt-steganography.
Algorithm
The algorithm is mainly divided into three major steps:
1) AES data encryption algorithm.
2) Generation of prime number, finding its primitive root and using it to randomize bits.
First a password (large no) is entered by the user.
Generate the smallest prime no greater than the password.
Find its primitive root.
3) Using modified LSB technique to hide the encrypted message behind the carrier image.
Select the pixel from the number generated by the primitive root of prime modulo n method.
Replace the LSB of this pixel with the first bit of cipher text generated by the AES algorithm.
Use of Bitmap Files
First you will need to read your picture as a jpg and then save it in 24-bit bmp format.
You will need to use bmp files for this assignment because JPEG’s are ”lossy” meaning that what you write to the file may be changed slightly so that the resulting image can be stored more efficiently.
Thus JPEG’s will not work for steganography because JPEG’s will change the secret message when storing the file to disk.
Here are the commands to save your file. You can give it the same name except be sure to put a .bmp file extension on the end.
Interaction
Prompt the user if they want to encode or decode a message.
Use the File Chooser dialog to prompt the user for an input file.
If encode, prompt the user for an input message. Encode the message into the picture.
Then use the File Chooser 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
Extract the pixels of your target picture in one big array using the textgetPixels() 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.
Every thing that you need to hide in a pixel is 8-bits long. The length (in the first pixel) is a byte. You can typecast all the Unicode chars to bytes as well.
Use the method below to hide each byte in an appropriate pixel.
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.
Remember that each pixel has three bytes: one byte for red, blue and green colors. Each byte has 8 bits to encode a number between 0 and 255.