A Cryptographic Design for a Secured Communication using FPGA

ISSN: 2347-9329 (Online)
IJECEAR Vol. 2, ISSUE 2, Feb. 2014
A Cryptographic Design for a Secured
Communication using FPGA
M.R. Gauthama Raman
Dept. of Electronics and Communication Engineering
B.S.ABDUR RAHMAN UNIVERSITY
Chennai, India
[email protected]
Abstract - In recent times the major challenge in the field of
communication is to provide the security for the data that has to
be transmitted. Various Cryptographic systems propose the
different techniques
for the encryption of the data for
protecting it from the unknown threats but the major goal of
those cryptographic systems should not only provide the
security but also ensure the communication taking place
smoother and also faster without any trouble. Developments in
Field Programmable Gate Arrays (FPGAs) made possible to
use it for implementing the various embedded applications
since it provides the chance for the reconfiguration and also for
the change in resources been used. In this paper Blow fish
algorithm in VHDL is implemented and shown that it is faster
and consumes minimal power as compared with the existing
system. The speed can be intensively increased further by
introducing the concept of pipelining.
Index Terms—Encryption; Decryption; Blowfish Cryptography
;VHDL; Micro blaze; EDK Tool, FPGA
I. INTRODUCTION
Field Programmable Gate Arrays (FPGAs) were first
introduced almost two and a half decades ago. Since then they
have seen a rapid growth and have become a popular
implementation media for digital circuits. The advancement in
process technology has greatly enhanced the logic capacity of
FPGAs and has in turn made them a viable implementation
alternative for larger and complex designs. Further,
programmable nature of their logic and routing resources has
a dramatic effect on the quality of final device‟s area, speed,
and power consumption. Now a days the application of the
FPGAs are extended to embedded fields and various research
works are been carried out which uses the FPGA as a basic
platform of the embedded systems. If we consider the field of
the data communication, providing the data security is the
major challenge. All cryptographic techniques should ensure
the following requirements.
©All rights reserved.
IJECEAR 2014
Dr, S. Kaja Mohideen
Prof & Dean (ECS)
Dept. of Electronics and Communication Engineering
B.S.ABDUR RAHMAN UNIVERSITY
Chennai, India [email protected]
1. Confidentiality: Data must not be in the form of easy
understandable for an unauthorized person.
2. Integrity: No Change in data should take place during
the transmission or in any other process.
3. Non- repudiation: The sender should not decline the
data at the later stage of transmission.
4. Authentication: Both Receiver and sender conforms
their originality.
We all know that the higher security is going to be an
important quality of any data encryption algorithm. While
implementing such things, we should also consider about the
other factors like power consumptions, memory, CPU time
etc…, Currently various research focus on the development
of new hardware security modules which provide the trusted
communication and also concentrates on the power
consumption and also the processing speed. Among the
existing, Blowfish algorithm is been chosen since it has major
advantage in the parallel computing as compared with the
AES.
II.LITERATURE SURVEY
a. Advanced Encryption Standard (AES):
The AES is a symmetric key encryption type which
is been used in various private sectors. It possesses three
block cipher. They are AES-128, AES – 192, AES- 256. It is
the substitution- permutation network in which the data and
key are processed by substitution block called as s blocks or
the permutation blocks called as p blocks.
If we consider 128-bit input block, it is been divided
into a 4X4 array of 8 bits. Each are represented as „state‟ The
two important mathematical operations that are performed
repeatedly is S-boxes and P- boxes. S-boxes will replace one 8
www.arph.in/ijecear/
Page 88
ISSN: 2347-9329 (Online)
IJECEAR Vol. 2, ISSUE 2, Feb. 2014
bit number to another whereas the P-boxes will shuffle the 8
bits. Every Round of AES algorithm consists of „Sub
bytes‟, ‟Shift Rows‟, ‟Mix column‟, „Add Round key‟.
and laptops since it require a very less amount of RAM space
around 4 Kilobytes.
AES generally consists of finite field elements for
the reason of mathematical calculations including the key. The
total number of rounds in AES algorithm depends on the key
size. There are 10,12,14 rounds for 128 bits, 192 bits, 256 bits
keys respectively. The operations in all the rounds are same
except for the last round. „Mix columns‟ will not be present.
At the final stage the plain text is converted into
cipher text and decryption also same as the encryption were
the plain text is obtained back.
Now a day‟s various cryptographic techniques are
available in the form of both hardware and software to
perform the encryption operation for converting the plain text
to the cipher text so that unauthorized person cannot identify
the data similarly authorized person can obtained the plain
text by performing the decryption process
The two Belgian cryptographers developed
RIJNDAEL algorithm to replace the DES algorithm. In a
mean while American National Standards and Technology
Association developed Future generation Encryption Standard
called Advanced Encryption Standard (AES). This AES is
generally used in all application like mobile where the strong
encryption is required.
Blowfish algorithm is used now to replace all the
existing techniques which use the variable length key from 32
bits to 448 bits. The security level will depends on the key
size. Since it is a symmetric key cryptography, the area
required will be less because of encryption and decryption
process is reversible one.
b. Blowfish Algorithm :
Blowfish Algorithm is a symmetric key
cryptographic, which is a open source algorithm available for
all users developed during the year of 1993 by Bruce Schneier.
It includes large number of cipher suites and encryption
products. The most important features of this design consists
of S-boxes and highly complex key schedule. The major
advantage of this algorithm is the fast processing except while
there is a change in keys.
When there is a change in key then the preprocessing equivalent takes the longer time which makes this
algorithm slower as compared to other block ciphers. This
makes the algorithm not suitable for all applications. If we
consider the password – hashing technique in openBSD,
blowfish algorithm is considered to be more suitable since
slow key scheduling. The security against the dictionary
attacks can be obtained during the extra computational effort.
This blowfish algorithm can be used in early small desktops
©All rights reserved.
IJECEAR 2014
TABLE 1 :
PERFORMANCE ANALYSIS BASED ON SPEED
III.
BLOWFISH IN PRACTICE
Blowfish algorithm is a 64 bit block cipher, which
have two parts. Key expansion and data encryption. Key
expansion process generates the sub keys of maximum 4168
bytes when we use the key as 448 bits.
The next important part of Blowfish, is data
encryption where there are 16 rounds. Each and every round
consists of key dependent permutation and key–data
dependent substitution. The operations which are performed
on 32 bit words are XORs and additions. For every round
there will be a four indexed array data lookups which is
considered to be additional operation.
a. Sub Keys Generation:
Blowfish algorithm generates large number of sub
keys and they have to be computed before the encryption or
decryption of the data.
1. There are totally 18 P-arrays in which each have 32-bit
sub-keys
P1,P2,P3,....,P18
2. There are four S-boxes with 256 entries. Each S-box is
of 32 bit in length.
S1,0,S1,1,...,S1,255;
S2,0,S2,1,...,S2,255;
www.arph.in/ijecear/
Page 89
ISSN: 2347-9329 (Online)
IJECEAR Vol. 2, ISSUE 2, Feb. 2014
S3,0,S3,1,...,S3,255;
S4,0,S4,1,...,S4,255;
In later part of this paper, calculation of sub-keys is
briefly explained.
b. Encryption and Decryption:
The steps for Encryption process in Blowfish
algorithm is given below. Totally it has 16 rounds. Let x be
the input data of 64-bit.
Divide x into two 32-bit halves: xL, xR
For i=1 to 16;
xL= xL XOR Pi
xR=F(xL) XOR xR
Swap xL and xR
After 16th round, swap xL and xR again to undo the swapping
process
FIG.2:
F NETWORK
c. Sub Key Expansion:
xR= xR XOR P17
For the exact calculation of sub key, the following
methods are used.
xL= xL XOR P18
Recombine xL and xR
The feistel structure of Blowfish Algorithm is shown
in the fig 1 and the structure for the F network is shown in the
fig 2
1. First initialize the P-array and then the four Sboxes, in order, with a fixed string. This string consists of the
hexadecimal digits of pi (less the initial 3). For example:
P1 = 0x243f6a88
P2 = 0x85a308d3
P3 = 0x13198a2e
P4 = 0x03707344
2. XOR P1 with the first 32 bits of the key, XOR P2
with the second 32-bits of the key, and so on for all bits of
the key (possibly up to P14). Repeatedly cycle through the
key bits until the entire P-array and key bits are XORed. (For
every short key, there is at least one equivalent longer key;
for example, if A is a 64-bit key, then AA, AAA, etc., are
equivalent keys.)
3. Encrypt the all-zero string with the Blowfish
algorithm, using the sub-keys described in steps (1) and (2).
4. Replace P1 and P2 with the output of step (3).
5. Encrypt the output of step (3) using the Blowfish
algorithm with the modified sub-keys.
6. Replace P3 and P4 with the output of step (5).
FIG.1:
BLOWFISH ALGORITHM FIESTEL NETWORK
©All rights reserved.
IJECEAR 2014
www.arph.in/ijecear/
Page 90
ISSN: 2347-9329 (Online)
IJECEAR Vol. 2, ISSUE 2, Feb. 2014
7. The process is repeated until, replacing all entries
of the P- array, and then all four S-boxes in order, with the
output of the continuously changing Blowfish algorithm.
The total number of iterations required for the
generation of all sub keys is 521. In order to improve the
speed, all sub-keys are pre computed and stored in cache.
The Software application in Soft IP Cores present in
the EDK can be designed using Soft Development Kit
(SDK). The languages like C or C++ can be used to
developing the user application Once the debugging is done,
it can be downloaded into FPGA as a bit file, which makes
the FPGA to work as a processor.
IV.EXPERIMENTAL SETUP
V.
The Hardware portion of the embedded processor is
designed using the Xilinx platform studio (XPS)
RESULTS
The Simulation of Blowfish Algorithm is done using
VHDL coding, and the result is shown in the Fig. 4
FIG.4: SIMULATION RESULT FOR THE BLOWFISH ALGORITHM
The RTL schematic of Blowfish Algorithm is shown
in Fig. 5
FIG.3 :
EMBEDDED DEVELOPMENT KIT DESIGN FLOW
The Xilinx Embedded Development Kit (EDK) is a
software tool used to design the embedded system in FPGA
kit using the Xilinx Micro Blaze and Power-Pc CPUs. XPS
requires Xilinx Platform Studio Software Development Kit
(SDK) which is used in creation of embedded software and
also for the verification.
FIG.5: RTL SCHEMATIC VIEW OF BLOWFISH ALGORITHM
©All rights reserved.
IJECEAR 2014
www.arph.in/ijecear/
Page 91
ISSN: 2347-9329 (Online)
VI.
IJECEAR Vol. 2, ISSUE 2, Feb. 2014
BLOWFISH LIMITATIONS
The best example for the variable- length key block
cipher is Blowfish Algorithm. It does not suit to all
applications since there is a great task for the sub key
generation before the encryption or decryption process. It can
be generally used in the application like communication link,
automatic file encryptor, mobile device where the key does
not change often. It is significantly faster and consumes less
power when compared with the present techniques like
AES,DES etc..,
VII.
[7]S. Vaudenay, “On the Weak Keys in Blowfish,” Fast Software
Encryption, Third International Workshop Proceedings, Springer-Verlag,
1996, pp. 27-32.
[8]Schneier, B., Blowfish symmetric block cipher, 1993.
CONCULSION
In the fields of information and technology
cryptographic models plays a very significant role for
assuring the secured communication. In this paper blowfish
cryptographic system is been studied and the various
performance measures like speed, power consumption are
analyzed. Stimulation of the Blowfish algorithm is been done
using VHDL coding and implementation is been carried out
in Spartan 3E FPGA board using impulse C coding.
In the future, various research works can be carried
out on improving the speed of this cryptographic system by
implementing the concept of parallel or pipelined processing
and also by varying the key size, power consumption can also
be minimized.
REFERENCES
[1]Jawahar Thakur, Nagesh Kumar, “DES, AES and Blowfish:
Symmetric Key Cryptography Algorithms Simulation Based Performance
Analysis,” International Journal of Emerging Technology and Advanced
Engineering ISSN 2250-2459, Volume 1, Issue 2, December 2011.
[2]P. Karthigai Kumar, K. Baskaran , An ASIC implementation
of low power and high throughput blowfish crypto algorithm, Sciencedirect,
6 April 2010.
[3]Tingyuan Nie, and Teng Zhang, “A Study of DES and
Blowfish Encryption) Algorithm,” 978-1-4244-4547- 9/09/IEEE, TENCON
2009.
[4]Diaa Salama Abdul. Elminaam, Hatem Mohamed Abdul
Kader and Mohie Mohamed Hadhoud3, “Performance Evaluation of
Symmetric Encryption Algorithms,” in IJCSNS International Journal of
Computer Science and Network Security, vol.8 No.12, December 2008,pp.
280-286.
[5]H. Singpiel, H. Simmler, A. Kugel, R. Manner,A. C. CastaAon
Vieia.F, Galvez-Durand, J. M. S . de Alciintara, V. C. Alves,
“Implementation of Cryptographic Applications on the Reconfigurable
FPGA Coprocessor microEnable,” 0-7695-0843-X/00, 2000 IEEE.
[6]Tingyuan Nie, Chuanwang Song, Xulong Zhi, Communication
and Electronic Engineering Institute Qingdao Technological University,
Qingdao, China - „‟Performance Evaluation Of DES And Blowfish
Algorithms‟‟, Supported by Shandong Province Natural Science Foundation
(ZR2009GL007) & A Project of Shandong Province Higher Educational
Science and Technology Program (J09LG10).
©All rights reserved.
IJECEAR 2014
www.arph.in/ijecear/
Page 92