You are on page 1of 9

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)

Web Site: www.ijettcs.org Email: editor@ijettcs.org


Volume 3, Issue 3, May – June 2014 ISSN 2278-6856

Text and Image Encryption Decryption Using


Advanced Encryption Standard
Kundankumar Rameshwar Saraf1, Vishal Prakash Jagtap2, Amit Kumar Mishra3
123
Assistant Professor, Department of Electronics and Telecommunication Engineering
Sandip Institute of Technology and Research Centre,
Nasik, Maharashtra, India
Abstract: Fast evaluation of digital data exchange occurs in Rijndael is selected as the algorithm for AES.
recent years. Due to that security of information is much Characteristics of Rijndael are: High security,
important in data storage and transmission process. Security mathematical soundness, resistance to all known attacks,
of internet banking account passwords, email accounts high encryption speed, worldwide royalty free use,
password etc. requires text protection in digital media. In the suitability across wide range of hardware and software.
same way image transmission and storage during industrial
and research processes requires image protection.
The National Institute of Standards and Technology (NIST) 2. Literature Survey
have initiated a process to develop Federal information 1. D. S. Abdul. Elminaam et.al., (2009) presents a
Processing Standard (FIPS) which should be most flexible, performance evaluation of selected symmetric
secure, fast and which can replace Data Encryption standard. encryption algorithms on power consumption for
This new standard is recognized by name Advanced wireless devices in their paper named “Evaluating the
Encryption Standard (AES). Features of data are depends on Effects of Cryptography Algorithms on power
its types. Therefore same encryption technique cannot be used consumption for wireless devices.” following points are
used for all types of data. Images have large data size and concluded by him from his experimental result. 1) If
also has real time constrain problem hence similar method packet size is changing with or without transmission of
cannot be used to protect images as well as text from data using various WLANs protocols and different
unauthorized access. However with few variations in method architectures. It was concluded form the result that
AES can be used to protect image as well as text. In this Blowfish and AES has better performance than other
project I have implemented encryption and decryption for text common encryption algorithms used, followed by RC6.
and image using AES. Worm holes are present in the security mechanism of
For text encryption 128 bit text inputs are synthesized and DES and 3DES; Blowfish and AES do not have such
simulated on TMS320C6713 DSP processor using Code worm holes any so far [4].
Composer Studio tool in simple C language code. 2. Energy Consumption of RC4 and AES Algorithms
For image encryption java code is synthesized and simulated
in Wireless LANs is analyzed in the year 2003 by P.
by Java Application Platform SDK. Mainly Code Block
Prasithsangaree and his collegeue P. Krishnamurthy.
Chaining (CBC) mode with PKCS 5 padding is used for
RC4 and AES encryption algorithms performance
image encryption.
evaluation is made by their research. The matrics for
such evaluation are as follows: CPU work load,
Keywords — Advanced Encryption Standard (AES),
encryption throughput, key size variation and energy cost.
CBC mode, FIPS, NIST, Rijndael
Experimental results conclude that for encrypting large
packets the RC4 is energy efficient and fast. However, for
1. INTRODUCTION a smaller packet size encryption AES was more efficient
Due to increasing use of computers, now a day security of than RC4. Therefore it appears that by using a
digital information is most important issue. Intruder is an combination of RC4 and AES we can save energy to
unwanted person who reads and changes the information provide encryption for any packet size.
while transmission occurs. This activity of intruder is 3. Seyed Hossein Kamali, Reza Shakerian, Maysam
called intrusion attack. To avoid such attack data may be Hedayati, Mohsen Rahmani, “A New Modified Version of
encrypted to some formats that is unreadable by an Advanced Encryption Standard (AES) Based Algorithm
unauthorized person. AES is mainly advance version of for Image Encryption” (2010) [26]
data encryption standard (DES). The authors proposed an enhanced model of Advanced
Effort towards developing the AES was started by NIST Encryption Standard to possess good level of security and
from January 1997. AES is a symmetric key encryption better range of image encryption. The modification
algorithm, and NIST made a worldwide public call for the process can be carried out by adjusting the Shift Row
algorithm to succeed DES. Initially 15 algorithms were Transformation. As the result shown, that the comparison
selected. After detail analysis they were reduced down to has been made in between the original AES encryption
5 algorithms namely MARS, RC6, Rijndael, Serpent and algorithm and the modified algorithm which produces
Twofish. All these algorithms were iterated block ciphers. very good encryption results focusing towards the security
The all five finalists were determined to be qualified as against statistical attacks.
the algorithm for AES [3]. After complete analysis

Volume 3, Issue 3 May – June 2014 Page 118


International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May – June 2014 ISSN 2278-6856

3. Text encryption and decryption by AES a. AddRoundKey Routine


3.1 Rounds in AES K0,0 K0,1 K0,2 K0,3 a0,0 a0,1 a0,2 a0,3
Length of the input output block and the State is 128 for
AES algorithm. This is represented by Nb = 4, which K 1,0 K1,1 K1,2 K1,3 a1,0 a1,1 a1,2 a1,3
reflects the number of 32-bit words (number of columns) K 2,0 K2,1 K2,2 K2,3 a2,0 a2,1 a2,2 a2,3
in the State. For the AES algorithm 128, 192, or 256 bits K 3,0 K3,1 K3,2 K3,3 a3,0 a3,1 a3,2 a3,3
is the length of the Cipher Key, K. The key length of
the block is denoted by Nk and its value is 4, 6, or 8. This
=
value reflects the number of 32-bit words (number of B0,0 B0,1 B0,2 B0,3
columns) in the Cipher Key.
B1,0 B1,1 B1,2 B1,3

Table 1: Key-Block-Round Combinations B2,0 B2,1 B2,2 B2,3


Number of B3,0 B3,1 B3,2 B3,3
Block Size Key Length Rounds (Nr)
Algorithm
(Nb (Nk words)
words)
The AddRoundKey routine is simple XOR addition of
round key and a portion of expanded key into plaintext.
AES-128 4 4 10
b. SubBytes
AES-192 4 6 12
Subbyte is the SBOX for AES. It operates on each byte in
AES-256 4 8 14 the state and performs a non-linear substitution in the
GF(28) field, which is what makes AES a non-linear
cryptographic system. In order to be invertible each
For the AES algorithm, during the execution of algorithm value of b’ must be generated from a unique value of b. A
the numbers of rounds to be performed are dependent on look up table can also be implemented for SubBytes.
the key size. Nr is used to represent the number of rounds. SubByte operation performs an affine transformation on
The combinations of Key-Block-Round that conform to the inverse of byte b, and adds it to 0xC6.
this standard are given in table 1 above.
AES algorithm uses a round function for both its Cipher
c. ShiftRows
and Inverse Cipher. This function is composed of four ShiftRows operates on individual rows of the state. It
different byte-oriented transformations: A) Using a provides diffusion throughout the AES algorithm. The
substitution table (S-box) byte substitution, B) By first row is not changed. The second row is shifted one
different offsets shifting rows of the State array, C) byte to the left, with the left most byte wrapping around.
mixing the data within each column of the State array, The third row shifts two bytes to the left, and the fourth
and D) adding a Round Key to the State. No. of round row shifts three bytes to the left with appropriate
keys generated by key-expansion algorithm is always one wrapping to the right. This description is for AES-128,
more than the actual no. of rounds present in the the number of shifts for each row changes based on the
algorithm. Therefore the equation can be made as key size.
follows:
Table 2: Number of shifts in ShiftRows
Number of round keys = Nr+1 (1)
Nb Row 0 Row 1 Row 2 Row 3
We refer to the round keys as K0, K1, K2……….KNr
4 0 1 2 3
3.2 The Algorithm 6 0 1 2 3
The input (block size Nb, also known as plaintext) of the 8 0 1 3 4
AES algorithm is converted into a 4 x 4 array, called a
state. Four transformations, AddRoundKey, SubBytes,
d. MixColumns
ShiftRows and MixColumns, perform various operations
MixColumns operates on individual columns of the state.
on the state to calculate the output state (the final cipher
It provides diffusion throughout the AES algorithm. The
text). Except for AddRoundKey each of these operations
columns are considered polynomials over GF(28) and
are invertible.
multiplied modulo x4+1 with a(x) where a(x) = {03}x3 +
InvMethod( Method( a ) ) = a (2)
{01}x2 + {01}x + {02} NOTE: x4+1 is relatively prime
If AddRoundKey operates on a variable twice, the variable
to a(x). This can be represented as a matrix equation:
itself is returned.

3.3 Transformation in AES


To perform all these transformations above, some
mathematical operations are needed to understand which
are given as below.

Volume 3, Issue 3 May – June 2014 Page 119


International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May – June 2014 ISSN 2278-6856

This can be converted to a system of equations which can 4. Implementation


be computed per the addition and multiplication rules I have successfully implemented the AES text encryption
described in section 2. InvMixColumns can be described using C code and DSP Processor using Code Composer
by the equation: Studio software for simulation. I got all the desired
results of encryption as well as correct decryption of text
message and produces original message. The maximum
positions in the input message as well as in key should
not exceed 16 positions in length. Because I use the 128
bit size of data and key. Therefore each position whether
it is alphabet, number, symbol or blank space is encrypted
into 8 bit sequence.
As shown in figure 1 and 2 below the AES algorithm
loops through certain sections Nr times. The Number of positions = 128/8 = 16 (3)
AddRoundKey is performed at the beginning and at the
end of the cipher in order to provide initial and final One block comprises total sixteen bytes of 8 bit sequence
randomness to the algorithm. Without this operation, format. From this block first four bytes forms first column
anyone can easily deduct the first or last portion of the elements. In such a way next four bytes forms second,
cipher, and therefore it would be irrelevant to the security third and fourth column elements. One row contains total
of the cipher. In order to make the encryption and four letters and 32 bits. Four such rows are placed one
decryption routines more similar the last round in the below another. It forms 4*4 sizes square of blocks. This
cipher is completely different from the other rounds. It block is then further encrypted as well as decrypted.
reduces the complexity in hardware, and software,
implementations. 5. Results for Text Encryption and
Plain Text Decryption
When I download the C program in DSP processor
TMS320C6713, the following results are obtained to me.
Round Key AddRoundKey 1st Round 1. 128 bit key: swapnil ghorpade (16 positions)
INPUT MESSAGE: Kundan Saraf!82 (16 positions)
SubBytes
ShiftRows Repeat
Encrypted message:
MixColumns Nr-1
Decrypted message: Same as input message
Round Key Round
AddRoundKey
2. 128 bit key: 1234567891234567 (16 positions)
SubBytes INPUT MESSAGE: 1234567891234567 (16 positions)
ShiftRows Last Round Encrypted message:
Round Key
AddRoundKey Decrypted message:

Cipher Text
Figure 1: AES encryption algorithm 3. 128 bit key: 1234567891234567 (16 positions)
INPUT MESSAGE: 9876543219876543 (16 positions)
Encrypted message:
Decrypted message:

4. 128 bit key: k.k.w.i.e.e.r.(14 positions)


INPUT MESSAGE: k.k.w.i.e.e.r.(14 positions)

Encrypted message:
Decrypted message: Same as input message
5. 128 bit key: abcdefghijk (11 positions)
INPUT MESSAGE: pqrstuvwxyz (11 positions)
Encrypted message:
Figure 2: AES decryption algorithm Decrypted message: Same as input message

Volume 3, Issue 3 May – June 2014 Page 120


International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May – June 2014 ISSN 2278-6856

6. 128 bit key: ABCDEFGHIJK (11 positions) Observation 9 if we write key in the form of numbers
and input message in the form of letters it provides at that
INPUT MESSAGE: pqrstuvwxyz (11 positions)
time decrypted message contains original message along
with input message.
Encrypted message:
Decrypted message: Same as input message 7. Image Encryption
7.1 Need of Image Encryption
Many digital services like multimedia systems, medical
7. 128 bit key: ABCDEFGHIJK (11 positions) and military imaging systems, internet communication
INPUT MESSAGE: PQRSTUVWXYZ (11 positions) require reliable security in storage and transmission of
digital images. Due to growth of internet, cell phones,
Encrypted message: multimedia technology in our society digital image
Decrypted message: Same as input message security is the most critical problem. In these technology
digital images plays more significant role than the
traditional texts. It demands serious protection of users'
8. 128 bit key: zyxwvutsrqp{?”% (15 positions) privacy for all applications. Therefore image encryption
INPUT MESSAGE: 678912345054321(15 positions) techniques are usually used to avoid intrusion attack [7].
Correlation among pixels and high redundancy, these
Encrypted message: characteristics are varies according to type of multimedia
data. Therefore generally same technique cannot be used
Decrypted message: Same as input message
to protect all types of multimedia data.
We may not use the traditional encryption algorithms to
encrypt images directly because two reasons.
9. 128 bit key: 7891223737445576 (16 postions)
1) The size of image is often larger than text. Hence
INPUT MESSAGE: Iugehawrmuetbyjl (16 postions) traditional encryption algorithms take larger time to
encrypt and decrypt images compared to text.
Encrypted message: 2) In text encryption both decrypted and original text
Decrypted message: must be equal. This condition is never true for images.
Because due to human perception; decrypted image with
small distortion is usually acceptable (Chang et al, 2001),
(Jiri Jan, 2005), (David Salomon, 2005). We can reduce
6. Observations this perceivable information by decreasing the correlation
Observation 1 concludes that any normal text along with among image elements using certain transformation
symbol in both key as well as input can be easily techniques (Mitra et al, 2006).
encrypted and decrypted. Considering the above points, this research of image
Observation 2 concludes that any same number sequence encryption is divided into two parts. 1) First encryption
written in key as well as input produces the decrypted and decryption of image data is perform by Code Block
message which contains encrypted message also. Chaining method with PKC 5 padding of Advanced
Observation 3 concludes that any number different types Encryption standard. 2) After this we will perform
of number sequence written as a key and input produce password based encryption and decryption of image with
decrypted output along with encrypted message. It means the help of using MD5 and DES algorithm together.
that if we write numbers in key and input message at that
time decrypted message contains original message along 7.2 Digital Image Formats
with input message. There are many types of digital image formats like .bmp,
Observation 4 concludes that if we write same text .gif, .jpg, .pict, .eps and .png. This project can use any
message in input as well as key it will perform normal kind of format. The results obtain in this paper are mainly
encryption and decryption. using .gif format only. Therefore the detail explanation
Observation 5, 6 and 7 concludes that AES is case regarding .gif file format is given below.
sensitive algorithm if case of input message only or key a. GIF Files
only or both input message and key are change then it The Graphics Interchange Format (GIF) was originally
will produces a different encrypted message and invented by CompuServe in 1987. It is mainly used file
expected decrypted message. formats for web graphics and exchanging graphics files
Observation 8 if we write letters along with symbols in between computers. GIF format supports 8 bits of color
place of key and if input provided is in number form it information. This information is limited to 8 bits palette
will perform normal encryption and decryption and and 256 colors. Therefore 256 different colors are
provide input message as a decrypted message. available in this format to represent the picture. GIF also

Volume 3, Issue 3 May – June 2014 Page 121


International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May – June 2014 ISSN 2278-6856

support transparency, interlacing and animation. detected with a separate message authentication code such
(Gardner and Betcher, 2006), (Robert Fry, 2006). as CBC-MAC, or a digital signature.
When we use LZW (Lempel-Ziv-Welch) method to save
8.1 Initialization Vector (IV)
GIF images, GIF images are automatically compressed.
Initialization vector (IV) or starting variable (SV) [19] is
LZW method also does degrade any image quality.
a block of bits. Several modes use it to randomize the
Features of GIF format: transparency, interlacing, file
encryption. By this randomization it produces distinct
compression, and primitive animation.
ciphertexts even if the same plaintext is encrypted
The interlacing feature browser can display portions of
multiple times, without the need for a slower re-keying
the image as it updates. Because of updating of
interlacing part the original poor image becomes more process [20].
and better.
Security requirements of an initialization vector are
different than a key, so the IV usually does not need to be
8. AES Block Cipher Mode of Operation secret. Therefore in most cases, it is important that an
ECB, CBC, OFB, CFB, CTR, and XTS are the different initialization vector is never reused under the same key.
modes of operation of AES. Here we use CBC mode with But for CBC and CFB mode, due to reusing an IV leaks
PKCS5 padding. Following section briefly introduces some information about the first block of plaintext, and
cryptographic modes and padding techniques. about any common prefix shared by the two messages.
A. What is Mode of Operation? For OFB and CTR both modes effectively create a bit
In cryptography some algorithm uses a block cipher to stream that is XORed with the plaintext, and this bit
provide an information service such as confidentiality or stream is dependent on the password and IV only. Due to
authenticity, these algorithm are called as mode of that in these modes, reusing an IV completely destroys
operation of cryptography.[15] The secure cryptographic security [20]. This can be seen because both modes
transformation (encryption or decryption) of one fixed- effectively create a bit stream that is XORed with the
length group of bits called a block is the only function plaintext, and this bit stream is dependent on the
performs by block cipher.[16] To securely transform password and IV only [22]. In CBC mode use of the IV is
amounts of data larger than a block it is needed to must; in addition, it should be unpredictable at encryption
repeatedly apply cipher’s single-block operation. The time. Therefore it can be conclude that, the (previously)
procedure of applying this operation is described by mode common practice of re-using the last cipher text block of
of operation algorithm.[17][18][19]. a message as the IV for the next message is insecure.
For each encryption operation most of the modes require In TLS CBC IV attack, if an attacker knows the IV or he
a unique binary sequence which is called initialization knows the previous block of cipher text before he specifies
vector (IV). The IV is always needed to be non-repeating next plaintext. In such scenario an attacker can guess
and for some modes random as well. Even when the same about the plaintext of some block that was encrypted with
plaintext is encrypted multiple times independently with the same key before [23].
the same key, distinct ciphertexts must be produced each
time. To ensure that use of initialization vector is 8.2 Padding
important.[20] Size of blocks within a block cipher mode A block cipher works on fixed block size units, but length
may be variable but during transformation the block size of coming messages are variable. So some modes like
is always fixed. Operation by block cipher is performed ECB and CBC require that the final block be padded
onto the complete block. During this operation it is before encryption. In padding method extra bits are
require that, the last part of the data must be padded to a padded (i.e. added) in text message to make require size
full block if it is smaller than the current block size.[16] of block for encryption. Several padding schemes exist. In
In some modes block cipher is effectively used as a stream simplest padding scheme we add null bytes to the
cipher. In such modes padding does not require. plaintext to bring its length up to a multiple of the block
size. In this scheme care must be taken that the original
Traditionally, main use of encryption modes is to provide length of the plaintext can be recovered. For example, if
error propagation property under various scenarios of data the plaintext is a java style string which contains no null
modification. Recently integrity protection is an entirely bytes except at the end. Another more complex example
separate cryptographic goal. In efficient way combination is the original DES method. In this method to fill out the
of confidentiality and authenticity is provided by some block a single bit is added, followed by enough zero bits.
modern modes of operation. These modes are known as A whole padding block will be added whenever this
authenticated encryption modes.[17] message ends on a block boundary. Schneier and
Ferguson suggest two simple methods of padding which
In AES algorithm confidentiality is provided by block are as follows: (a) Pad the last block with n bytes all with
cipher modes such as ECB, CBC, OFB, CFB, CTR, and value n. (b) Append a byte with value 128 (hex 80),
XTS, but they do not protect against accidental followed by as many zero bytes as needed to fill the last
modification or malicious tampering. These accidents are block.

Volume 3, Issue 3 May – June 2014 Page 122


International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May – June 2014 ISSN 2278-6856

8.3 Operation of Image Encryption and Decryption 8.4 What is PKCS5 padding?
Execute the Encrypt code This scheme is use to pad clear text to be multiples of 8-
byte blocks.
Read the input image from the specified location DES algorithm requires that the input data to be 8-byte
blocks. Suppose any text message is not the multiples of
Apply AES –CBC–PKCS5 padding algorithm to this image 8-byte blocks. Then the encryption of such text messages
is performing by padding method. In this we pad
additional bytes to text message to make text messages to
Get a password from the user
be multiple of 8-byte blocks.
PKCS5Padding scheme is described in: RSA
Laboratories, "PKCS #5: Password-Based Encryption
Append salt bytes to the password before it is used to Standard," version 1.5, November 1993.
calculate the key
It follows the following rules:
1) The number of bytes to be padded = 8 – (number Of
Make password based encryption with MD5 and DES Bytes (clearText) mod 8).
algorithm
2) Depending on the length of the clear text data 1 to 8
bytes will be padded to the clear text data.
Make a PBE Cipher object and initialize it to encrypt using 3) All padded bytes have the same value - the number of
the given password bytes padded.
PKCS5Padding scheme can also be explained with the
diagram below.
Save the new encrypted image to the specified location
Where, M= original clear text and PM = padded clear
text:
If number Of Bytes (clearText) mod 8 == 7, PM = M +
Encrypted Image
0x01 (6)
If number Of Bytes (clearText) mod 8 == 6, PM = M +
Figure 3: Flowchart of Encryption Process 0x0202 (7)
The detail process of image encryption and decryption is If number Of Bytes (clearText) mod 8 == 5, PM = M +
shown in the block diagrams given in figure 3 and figure 0x030303 (8)
4 below. If number Of Bytes (clearText) mod 8 == 0, PM = M +
0x0808080808080808 (9)
8.5 What Is The Use Of Hash Function?
Execute the Decrypt code It is a cryptographic function. It is mainly an algorithm
that takes an arbitrary block of data and returns a fixed-
Get another same password from the user size bit string. Any change in data will change the hash
value. The data to be encoded is called the “message,”
and the hash value is simply called digest or called the
No message digest.
Is this expected
password?
8.6 Why Salt is needed to add?
If any password is hashed, any identical password will
Yes have the same hash. Only storing the password’s hash
Detect and remove the appended salt bytes from the creates two drawbacks as given: (1) Attacker can find a
password
password very quickly by using birthday paradox method
(given at http://en.wikipedia.org/wiki/Birthday_paradox).
It will become much easier if large numbers of passwords
Now read the encrypted image from the specified location
are store in database. (2) An attacker can break the
password in seconds by using the list of pre computed
Make a PBE Cipher object using MD5 and DES algorithm hashes (given at
and initialize it to decrypt using the given password. http://en.wikipedia.org/wiki/Rainbow_table).
To remove these drawbacks a salt can be concatenated to
the password before performing the hash operation.
Decrypt the image and save it to specified location
Salt: It is fixed length random number. It must be
different for each stored entry. It is stored after hashed
password in the form of clear text.
Decrypted Image
In this configuration, on each individual password an
attacker must handle a brute force attack. Birthday
Figure 4: Flowchart of Decryption Process attack/rainbow crack resistant is the database in this case.

Volume 3, Issue 3 May – June 2014 Page 123


International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May – June 2014 ISSN 2278-6856

8.7 Key Derivation of Password-Based Encryption in 9.1 Performance Parameter


Java Table 3. Time taken for Different Images [1]
For password-based encryption, a random salt sequence is Image Image Size on Time taken to
used to prevent dictionary attacks. Also a deliberately Size Disk Encrypt and Decrypt
slow function is used to generate a key (such as an AES 256*256 66KB 0.707322ms
or DES key) from a given password and salt. 512*512 258KB 2.796286ms
There are several possible schemes available, but a 1024*102 3.07MB 167.11ms
common scheme is as follows: 4
 We append counter, which will start at 1 and
also append the password to the salt. Table 4. Average Time Required By AES for Different
 We first create a sequence using first step then Images [29]
calculate hash function of the sequence. Image (Size) Image
 After that we repeat the process for some (Size)
number of iterations. In each of the iteration it Lisaw (256×256) 31.75 ms
forms the new sequence which is to be hashed Lena(256×256) 31.75 ms
from the output of the previous hash and also Cheetah(200×320 29, 25 ms
append the incremented counter and salt )
 PBEWithMD5AndDES Clown (200×320) 29, 25 ms
This option is the combination of all benefits of Rose (200×320) 29, 25 ms
insecure 56-bit encryption, slow operation, with an
insecure hash function (MD5). It mainly used to Table 5. Encryption Time Using Different Algorithms
interface with legacy code. with Lena as a Test Image [29]
Algorithm Encryption
9. Results of Image Encryption (s)
The original input image taken by this project is of .GIF MIE 0,27
file of size 204 kb which is as follows: VC 1,98
N/KC 0,15
AES 0,03175

10. Conclusion
This paper shows successful implementation of text and
image encryption as well as decryption. Due to
combination of C code, Code Composer Studio and DSP
processor a unique solution for text encryption is provided
Figure 5: Input original image before encryption
here. This text encryption uses 128 bit size of key as well
as plaintext. Each word or space is converted into 8 bit
The cipher text image is blank image .GIF file of size 216
sequence. Therefore maximum total 16 positions are
kb as shown below: recognized by this code. Letters, spaces, numbers or
symbols can be written to these 16 positions. Results
showed here uses different numbers, symbols and letters
for text encryption. All the observations clearly conclude
the behaviour of text encryption code.
AES encryption algorithm in CFB mode is used here for
image encryption. PKCS5Padding method is used here.
Figure 6: Encrypted image The comparative performance benefit of code is clearly
shown here. It can clearly conclude from the table 5, 6
This image is output of encryption and input to and 7 that AES is fastest algorithm among all others.
decryption. The decrypted output image looks like Java Application Platform SDK is open source software
original image. It is also .GIF file of size 216 kb as below: therefore image encryption can be provided without
investing any cost.
The proposed methodology is applied for ensuring the
personal privacy in the context of surveillance video-
camera systems. Only authorized users that possess the key
key can decrypt the entire encrypted image sequence. The
proposed method has the advantage of being suitable for
mobile devices, which currently use the JPEG image
compression algorithm, due to its lower computational
Figure 7: Decrypted image after decryption requirements. The experiments have shown that we can

Volume 3, Issue 3 May – June 2014 Page 124


International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May – June 2014 ISSN 2278-6856

achieve the desired level of encryption in selected areas of [8] AES page available via
the image, while maintaining the full JPEG image http://www.nist.gov/CryptoToolkit.
compression compliance, under a minimal set of [9] Computer Security Objects Register (CSOR):
computational requirements. http://csrc.nist.gov/csor/.
[10] J. Daemen and V. Rijmen, “AES Proposal: Rijndael,
11. Future Scope AES Algorithm Submission”, September 3, 1999.
The proposed system can be extended to standard video [11] J Daemen and V. Rijmen, “Ihe block cipher Rijndael
coding systems such as those using MPEG and other video Smart Card research and Applications”, LNCS 1820,
formats. All the existing costly encryption products will Springer-Verlag, pp. 288-296.
have no use in future if the video encryption also invented [12] B. Gladman’s AES related home page
with royalty free open source software. Therefore it will be http://fp.gladman.plus.com/cryptography_technology
the most flexible and cheaper solution. /.
[13] A. Menezes, P. van Oorschot, and S. Vanstone,
In this world of internet encryption of every multimedia Handbook of Applied Cryptography, CRC Press, New
data is the basic need of all communication systems. York, 1997, p. 81-83.
Tremendous change in technology will appear if this [14] A. Lee, NIST Special Publication 800-21, Guideline
solution is free of cost. for Implementing Cryptography in the Federal
Today mobile phones are most important and habitual Government, National Institute of Standards and
thing for each human being. In the same way this Technology, November 1999.
encryption technology will become the basic need of [15] NIST Computer Security Division's (CSD) Security
everyone. Technology Group (STG) (2013). "Block cipher
modes". Cryptographic Toolkit. NIST. Retrieved
References April 12, 2013.
[1] Manoj. B, Manjula N Harihar, “Image Encryption [16] Ferguson, N.,Schneier, B. and Kohno, T.
and Decryption using AES” International Journal of Indianapolis “Cryptography Engineering: Design
Engineering and Advanced Technology (IJEAT) Principles and Practical Applications.” Wiley
ISSN: 2249 – 8958, Volume-1, Issue-5, Publishing, Inc. 2010. pp. 63, 64. ISBN 978-0-470-
June 2012 47424-2.
[2] Swati Paliwal and Ravindra Gupta, “A Review of [17] NIST Computer Security Division's (CSD) Security
Some Popular Encryption Techniques”, International Technology Group (STG) (2013). "Proposed modes".
Journal of Advanced Research in Computer Science Cryptographic Toolkit. NIST. Retrieved April 14,
and Software Engineering Research Paper, Volume 2013.
3, Issue 2, February 2013, ISSN: 2277 128X [18] Alfred J. Menezes, Paul C. van Oorschot and Scott
Available online at: www.ijarcsse.com A. Vanstone (1996). Handbook of Applied
[3] William Roche, “The Advanced Encryption Cryptography. CRC Press. pp. 228–233. ISBN 0-
Standard, The Process, Its Strengths and 8493-8523-7.
Weaknesses”, University of Colorado, Denver, [19] ISO, JTC 1/SC 27 (2006). "ISO/IEC 10116:2006 -
Spring 2006 Computer Security Class, CSC 7002, Information technology --Security techniques --
Final Paper May 6, 2006. Modes of operation for an n-bit block cipher". ISO
[4] Simar Preet Singh, and Raman Maini “Comparison Standards catalogue.
of Data Encryption Algorithms” International [20] Kuo-Tsang Huang, Jung-Hui Chiu, and Sung-Shiou
Journal of Computer Science and Communication Shen (2013). “A Novel Structure with Dynamic
Vol.2, No. 1, January-June 2011, pp. 125-127 Operation Mode for Symmetric-Key Block Ciphers”
[5] Prasithsangaree.P and Krishnamurthy.P(2003), International Journal of Network Security & Its
“Analysis of Energy Consumption of RC4 and AES Applications (IJNSA) 5 (1): 19.
Algorithms in Wireless LANs,” in the Proceedings of [21] NIST Computer Security Division's (CSD) Security
the IEEE GLOBECOM 2003, pp. 1445-1449. Technology Group (STG) (2013). "Current modes".
[6] Dr. S.A.M Rizvi1, Dr. Syed Zeeshan Hussain2 and Cryptographic Toolkit. NIST. Retrieved April 12,
Neeta Wadhwa “A Comparative Study of Two 2013.
Symmetric Encryption Algorithms Across Different [22] "Stream Cipher Reuse: A Graphic Example".
Platforms” Cryptosmith LLC. Retrieved 27 March 2013.
[7] Mohammad Ali Moh'd Bani Younes, “An Approach [23] B. Moeller (May 20, 2004), Security of CBC
To Enhance Image Encryption Using Block-Based Ciphersuites in SSL/TLS: Problems and
Transformation Algorithm”, Thesis submitted in Countermeasures
fulfillment of the requirements for the degree of [24] William F. Ehrsam, Carl H. W. Meyer, John L.
Doctor of Philosophy University of Sains Malaysia, Smith, Walter L. Tuchman, "Message verification
2009. and transmission error detection by block chaining",
US Patent 4074066, 1976
Volume 3, Issue 3 May – June 2014 Page 125
International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May – June 2014 ISSN 2278-6856

About the Author


Mr. Kundankumar Rameshwar Saraf
received his M.E. degree in VLSI Design and
Embedded System from
K.K.W.I.E.E.R. Pune University in 2013. He
has got 3 years of teaching experience as Assistant
Professor in Electronics and
Tele Communication Engineering. He has received his
B.E. degree in Electronics from S.S.V.P.S.’s C.O.E.,
North Maharashtra University, Maharashtra

Mr. Vishal Prakash Jagtap received his


M.E.degree in Electronics & Tele
Communication A.E.C.O.E., Beed, BAMU
University in 2013.He has got 3 years
experience as Assistant Professor in Electronics and
Telecommunication. He has received his B.E. degree in
Electronics and communication from S.S.V.P.S.’s
C.O.E., North Maharashtra University, Maharashtra

Mr. Amit Kumar Mishra received his


M.E.degree in Communication System from
MITCOE, Aurangabad, BAMU University in
2013.He has got 6 years experience as
Assistant Professor in Electronics and
Telecommunication. He has received his B.E. degree in
Electronics and communication from S.S.E.C. Bhavangar
University, Gujrat

Volume 3, Issue 3 May – June 2014 Page 126

You might also like