AES Encryption of a text into images of various formats Sumit Kumar Singh (RIT2011034) Deepak Kumar Sah (RIT2011077) Vinayendra Kumar Singh (RIT2011009) under the guidance of -- Dr. Triloki Pant
AES Encryption of a text into images of various
formats
Sumit Kumar Singh (RIT2011034)Deepak Kumar Sah (RIT2011077)Vinayendra Kumar Singh (RIT2011009)
under the guidance of -- Dr. Triloki Pant
Introduction :
The main objective of this project is to provide a highly secured communication between people using the “Steganography” technique and the “AES Algorithm”.
This project first encrypts the secret message into cipher text using the AES algorithm. Then the cipher text is embedded into the image using the LSB technique. This will ensure higher security.
Definition :
Steganography is the art or practice of concealing a message, image, or file within another message, image, or file.
The word steganography is of Greek origin and means "covered writing" or "concealed writing".
Steganography AND Cryptography :
The advantage of steganography over cryptography alone is that the intended secret message does not attract attention to itself as an object of scrutiny. Plainly visible encrypted messages—no matter how unbreakable—will arouse interest, and may in themselves be incriminating in countries where encryption is illegal.
Steganography vs Watermarking :
Existing System :
Though there exists several software that are used for information hiding, they face a lot of problems i.e., they either do not encrypt the message or use a very weak algorithm.
In some other cases the technique used may not be very efficient that the original image and the resulting image will be easily distinguishable by human eyes.
Proposed System :
The proposed system uses the concept of Least Significant Bit (LSB) Algorithm which will overcome the above disadvantages. As the LSB technique changes only the LSB of the pixel values of the image, the embedded image will practically resemble the original image, so that the difference in the image cannot be seen with human eyes.
Also to ensure further security, this project uses the AES Algorithm for encryption. The AES Algorithm uses a key of size 128 bits to 256 bits. With a key size of 128 bits there are 10 rounds. This ensures further security. This project uses a key of size 128 bits.
Scope : This technique can be used for the following purposes, Corporate and office environments where secure
transmission of sensitive information is essential without being eavesdropped.
Personal storage of information in an unsuspected but secured medium of images.
Embedding copyright artist information within the image. Serial key and the CD key can be transmitted in a secured
manner.
Literature Survey :
Techniques Implemented :
There are two major techniques implemented in this project.
1. AES Algorithm (for encryption)2. LSB Technique (for hiding the text)
Flow Diadram:
1. AES Algorithm (Advanced Encryption Standard):
It is the encryption algorithm that is being used for converting the plain text (secret message) into the cipher text.
Ciphertext is the result of encryption performed on plaintext using an algorithm, called a cipher.
The algorithm consists of four stages: (i) SubBytes (ii) Shift Rows (iii) MixColumns (iv) AddRoundKey
Encryption function Cipher:
(i). SubBytes:
In the SubBytes step, each byte in the array is updated using an 8-bit S-box.
An S-box takes some number of input bits, m, and transforms them into some number of output bits, n, where n is not necessarily equal to m.
(ii). Shift Rows:
The ShiftRows step operates on the rows of the state; it cyclically shifts the bytes in each row by a certain offset.
For AES, the first row is left unchanged. Each byte of the second row is shifted one to the left. Similarly, the third and fourth rows are shifted by offsets of two and three respectively.
In this way, each column of the output state of the ShiftRows step is composed of bytes from each column of the input state.
(iii). MixColumns:
In the MixColumns step, the four bytes of each column of the state are combined using an invertible linear transformation. The MixColumns function takes four bytes as input and outputs four bytes, where each input byte affects all four output bytes.
(iv). AddRoundKey:
In the AddRoundKey step, the subkey is combined with the state.
For each round, a subkey is derived from the main key using the key schedule; each subkey is the same size as the state.
The subkey is added by combining each byte of the state with the corresponding byte of the subkey using bitwise XOR.
2. LSB Technique
This technique is the steganographic algorithm that is being used for embedding the text into the image.
In the LSB technique involves the following steps: (i) Convert the text into its binary equivalent (ii) Replace each bit of the cipher text with the last bit of each pixel in the image.
(i). Converting the Text into Binary:
Each character is first converted into its corresponding ASCII equivalent. The ASCII value is nothing but a number. Then, this ASCII value is converted into its corresponding binary equivalent. As an example the conversion of the text “Hi all”
(ii). Replacing the bits :
Each bit of the cipher text is replaced in the LSB position of the pixels in the image.
Since only the LSB is changed the difference between the original image and the encrypted image will be very small, that the difference cannot be detected by naked human eyes. Only softwares that are particularly determine the patterns in the images can detect the irregularities in the patterns.
Extract text message from embedded image
First we can take the Least Significant Bit of the embedded image.
Then convert these binary numbers into decimal numbers.
Now we have the encrypted text message.
Now we can use the AES algorithm in reverse.
Decryption function inv_cipher:
Extension :
This project can be further developed using high security algorithms for encryption or the algorithm used for embedding may be upgraded.
If possible instead of hiding the text files in the image, either an audio file or a video file or an image itself may be hidden inside an image.
Conclusion :
Steganography has its place in security. It is not intended to replace cryptography but to supplement it. Hiding message with steganography methods reduces the chance of a message being detected. However, if that message is also encrypted, if discovered, it must be cracked (yet another layer of protection).
References :
Katzenbeisser, S., ed. Information Hiding Techniques for Steganography and Digital Watermarking. Boston: Artech House, 2000.
William Stallings, Cryptography and Network Security, Third Edition, Pearson Prentice Hall, 2003.
Daemen, J., and Rijmen, V., Rijndael : The Advanced Encryption Standard. Dr. Dobb’s Journal, March 2001.
Herbert Schildt, Java 2 : The Complete Reference, Fifth Edition, Tata Mc.Graw Hill, 2002.