Image Encryption and Decryption Using BL PDF
Image Encryption and Decryption Using BL PDF
_________________________________________________________________
Proceedings of "National Conference on Emerging Trends in Information Technology (NCETIT-2012)"
Held at R.C.Patel Institute of Technology, Shirpur, Dist. Dhule,Maharashtra,India.
April 21, 2012
Professor, Electronics Department, M.H. Saboo Siddik College of Engineering, Mumbai University, Mumbai, India
Department, M.H. Saboo Siddik College of Engineering, Mumbai University, Mumbai, India
2,3,4Electronics
Abstract
This paper is about encryption and decryption of images using a secret-key block cipher called 64-bits Blowfish which is an
evolutionary improvement over DES, 3DES, etc designed to increase security and to improve performance. This algorithm
will be used as a variable key size up to 448 bits. It employs Feistel network which iterates simple function 16 times.
Specifically, in this algorithm, a combination of four S-boxes lookups, multiplications as well as fixed and data dependent
rotations will be used. In this paper we would be obtaining our results by simulating the image processing part in MATLAB &
encryption and decryption part in VHDL for better security.
Keywords:Blowfish, Cryptography, Image Encryption, Image Decryption, Feistel Network, Block Cipher.
INTRODUCTION
In the past few years the security and integrity of data is the
main concern. In the present scenario almost all the data is
transferred over computer networks due to which it is vulnerable to
various kinds of attacks. To make the data secure from various
attacks and for the integrity of data we must encrypt the data before
it is transmitted or stored. Government, military, financial institution,
hospitals and private business deals with confidential images about
their patient (in Hospitals) , geographical areas(in research ) ,enemy
positions (in defense), product , financial status. Most of this
information is now collected and stored on electronic computers and
transmitted across network to other computer. If these confidential
images about enemy positions, patient and geographical areas fall
into the wrong hands, than such a breach of security could lead to
declination of war, wrong treatment etc. Protecting confidential
images is an ethical and legal requirement.
We store information in computer system in the form of files.
File is considered as a basic entity for keeping the information.
Therefore the problem of securing image data or information on
computer system can be defined as the problem of securing file data.
It is word wide accepted fact that securing file data is very important,
in todays computing environment.
Cryptography is a method of storing and transmitting data in a
form that only those, it is intended for can read and process. It is a
*Corresponding Author
Irfan Landge
Assistant Professor, Electronics Department, M.H. Saboo Siddik College of
Engineering, Mumbai University, Mumbai, India
Email: irfan.mailbox@gmail.com
The F function
152
the i'th round are determined from the outputs Li-1 and Ri-1 of the
previous round:
Li = Li-1
Ri = Li-1
F (Ri-1, Ki)
where Ki is the sub-key used in the ith round and F is specific to the
particular algorithm.
The addresses a, b, c and d are 8-bits wide, while the S-box outputs are
32-bits wide.
The process of data encryption can be described as in the
pseudo code below:
Divide X into two 32-bit halves XL and XR
For i=1 to 16:
XL = XL
Pi
XR = F (XL)
XR
Swap XL and XR
End for
Swap XL and XR (Undo the last swap.)
XR = XR
P17
XL = XL
P18
Recombine XL and XR
Output X (64-bit data block: cipher text)
For decryption, the same process is applied, except that the
sub-keys Pi must be supplied in reverse order. The nature of the
Feistel network ensures that every half is swapped for the next round
(except, here, for the last two sub-keys P17 and P18).
IMAGE ENCRYPTION & DECRYPTION ANALYSIS
Encryption Process
In this case, original image data bit stream is divided into the
blocks length of Blowfish algorithm. Image header is excluded to
encrypt and the start of the bitmap pixel or array begins right after
the header of the file. The byte elements of the array are stored in
row order from left to right with each row representing one scan line
of the image and the rows of the image are encrypted from top to
bottom.
Decryption Process
Fig 2: F function
The F function is the kernel and distinguishing feature of Blowfish,
and is applied as follows:
Divide XL (32 Bits) into four 8-bit quarters: a, b, c, and d. Then:
F (XL) = {(S1[a] + S2[b])
153
Fig 6: Encryption-1
Encrypted Output 1: F724DCE39143E75D
Fig 7: Decryption-1
Decryption Output 1: 0607998404E1B33C
Plaintext (Input) 2: CFC982019FF00738
Here row 4 is been considered for the plaintext. Row 4 comprises of
64 bits.
Fig 8: Encryption-2
Encrypted Output 2: 3EEAC76656B872E3
154
Fig 9: Decryption-2
Decryption Output 2: CFC982019FF00738
155
HISTOGRAM ANALYSIS
Here the original image and its corresponding encrypted
image and their histograms of black & white images and colour
images respectively are shown in fig 15 and fig 16.
Both colour and black & white image of any size saved in
tagged image file format (TIF) can be encrypted & decrypted using
blowfish algorithm. Histogram of encrypted image is less dynamic
and significantly different from the respective histograms of the
original image. Blowfish cannot be broken until an attacker tries
28r+1 combinations where r is the number of rounds. Hence if the
number of rounds are been increased then the blowfish algorithm
becomes stronger. Since Blowfish has not any known security weak
points so far it can be considered as an excellent standard
encryption algorithm.
REFERENCES
[1]
156