Rsa Thesis
Rsa Thesis
Submitted by
Amandeep Singh
Roll No. 600861002
Under the Guidance of
Mrs. Manu Bansal
Assistant Professor, ECED
ACKNOWLEDGEMENT
First of all, I thank the Almighty God, who gave me the opportunity and strength to carry out this
work.
I would like to thank Mrs. Manu Bansal, Assistant Professor (ECED) for the opportunity to
work with her, and also for her encouragement, trust and untiring support. Mrs. Manu Bansal
has been an advisor in the true sense both academically and morally throughout this project
work.
Much appreciation is expressed to Prof. Abhijit Mukherjee, Director, Thapar University, and
Prof. R.K. Sharma, Dean of Academic Affairs to provide me moral support to go ahead with
my M.Tech Thesis work.
I thank to Mrs. Alpana Agarwal, Assistant Professor and PG Coordinator, ECED, Dr. A.K.
Chatterjee, Professor and Head, ECED and all the faculty of ECED for their continuous
inspiration during this thesis work.
The paucity of words does not compromise for extending my thanks to my all family members
and friends of M.Tech (VLSI & CAD Design) who were always there at the need of hour and
helped me in completing this research report.
I am also thankful to the authors whose work has been consulted, utilized and cited in my
dissertation.
Amandeep Singh
Roll No. 600861002
iii
ABSTRACT
There are many aspects to security ranging from secure commerce and payments to private
communications and protecting passwords. One essential aspect for secure communications is
that of secret key Cryptography. It is the automated method in which security goals are
accomplished. It includes the process of encryption that converts plain-text into cipher-text. The
process of decryption reconverts the cipher-text into plain-text. Secure communication is the
prime requirement of every organization. To achieve this, one can use many techniques or
algorithms available for Cryptography. Various models were developed for the encryption in
which keys were generated from the available data. Data Encryption Standard (DES) is the most
commonly used algorithm for security purpose that was announced by National Bureau of
Standard. It is the strongest algorithm but due to large processing time, it can be easily broken by
the eavesdroppers. Twofish algorithm is nowadays a strongest algorithm due to its large key
stream. An efficient encryption algorithm should consist of two factors fast response and
reduced complexity. Cryptosystems must satisfy three general requirements 1) the enciphering
and deciphering transformations must be efficient for all keys. 2) System must be easy to use. 3)
Security of the system should depend only on the secrecy of the keys and not on the secrecy of
the algorithms.
The main objective of this dissertation is to analyze the various aspects of DES and
Twofish algorithms.
iv
TABLE OF CONTENTS
CERTIFICATE
ii
ACKNOWLEDGEMENT
iii
ABSTRACT
iv
TABLE OF CONTENTS
LIST OF FIGURES
vii
LIST OF TABLES
viii
CHAPTER 1: INTRODUCTION
1.2 OBJECTIVES
8
8
16
17
18
21
35
36
4.2 F FUNCTION
36
4.3 S BOXES
37
38
39
39
41
41
43
44
44
5.2.3 SYNTHESIS
44
44
44
45
45
46
46
48
49
51
55
57
59
61
63
65
67
70
74
REFERENCES
75
vi
LIST OF FIGURES
Figure 1.1: Symmetric cryptography
16
17
19
20
36
37
38
42
43
45
46
47
48
49
49
50
vii
LIST OF TABLES
Table 3.1: Pin Configuration of DES Core
18
21
22
24
25
27
29
31
32
33
viii
CHAPTER
1
INTRODUCTION
Security attacks against network are increasing significantly with time. Our
communication media should also be secure and confidential. For this purpose, these
three suggestions arrive in every ones mind: (i) one can transmit the message secretly, so
that it can be saved from hackers, (ii) the sender ensures that the message arrives to the
desired destination, and (iii) the receiver ensures that the received message is in its
original form and coming from the right sender. For this, one can use two techniques, (i)
one can use invisible ink for writing the message or can send the message through the
confidential person, and (ii) one can use a scientific approach called Cryptography.
Cryptography is the technique used to avoid unauthorized access of data. For
example, data can be encrypted using a cryptographic algorithm in conjunction with the
key management. It will be transmitted in an encrypted state, and later decrypted by the
intended party. If a third party intercepts the encrypted data, it will be difficult to
decipher. The security of modern cryptosystems is not based on the secrecy of the
algorithm, but on the secrecy of a relatively small amount of information, called a secret
key. The fundamental and classical task of cryptography is to provide confidentiality by
encryption methods.
Cryptography is used in applications present in technologically advanced
societies; examples include the security of ATM cards, computer passwords, and
electronic commerce, which all depend on cryptography.
Cryptanalysis is the study used to describe the methods of code-breaking or
cracking the code without using the security information, usually used by hackers.
CHAPTER 1 INTRODUCTION
1.2 Objectives:
Cryptography is used to achieve the following goals:
Confidentiality:
Protection
against
unauthorized
disclosure
of
information.
Confidentiality may be applied to whole messages, parts of messages, and even existence
of messages [9]. Confidentiality is the protection of transmitted data from passive attacks.
Authentication: The authentication service is concerned with assuring that a
communication is authentic. It is the corroboration of the claimed source of a message.
Authentication is of two types: (i) Peer entity, and (ii) Data origin
Data integrity: The integrity can apply to a stream of messages, a single message, or
selected fields within a message. It assures that messages are received as sent, with no
duplication, insertion, modification, reordering, or replays. The destruction of data is also
covered under this service.
Access control: It is the ability to limit and control the access to host systems and
applications via communications links. To achieve this, each entity trying to gain access
must first be identified, or authenticated, so that access rights can be tailored to the
individual.
Nonrepudiation: Nonrepudiation prevents either sender or receiver from denying a
transmitted message. When a message is sent, the receiver can prove that the alleged
sender in fact sent the message.
CHAPTER 1 INTRODUCTION
If sender and recipient use the same key then it is known as symmetrical
or private key cryptography. It is always suitable for long data streams. Such
system is difficult to use in practice because the sender and receiver must know
the key. It also requires sending the keys over a secure channel from sender to
recipient.
CHAPTER 1 INTRODUCTION
and the key used for decryption is called the private key. Such technique is used
for short data streams and also requires more time to encrypt the data.
CHAPTER 1 INTRODUCTION
Digital Signature Generation:
CHAPTER 1 INTRODUCTION
Digital Signature Verification:
CHAPTER 1 INTRODUCTION
CHAPTER 1 INTRODUCTION
CHAPTER
2
LITERATURE SURVEY
Cryptography has a long and fascinating history. The most complete nontechnical account of the subject is Kahns The Code breakers that include cryptography
from its initial and limited use by the Egyptians some 4000 years ago, to the twentieth
century where it played a crucial role in the outcome of both world wars [1].
Beginning with the work of Feistel at IBM in the early 1970s and culminating in
1977 with the adoption as a U.S. Federal Information Processing Standard for encrypting
unclassified information, DES, the Data Encryption Standard, is the most well-known
cryptographic mechanism in history. The most striking development in the history of
cryptography came in 1976 when Diffie and Hellman published a transaction New
Directions in Cryptography. This paper introduced the revolutionary concept of publickey cryptography and also provided a new and ingenious method. Before the modern era,
cryptography was concerned solely with message confidentiality (i.e. encryption)
conversion of messages from a comprehensible form into an incomprehensible one and
back again at the other end, rendering it unreadable without secret knowledge (namely,
the key) [2]. In recent decades, the field has expanded beyond confidentiality concerns to
include techniques for authentication, digital signatures, interactive proofs, and secure
computation. For secure communication simple encryption devices such as Enigma
machine were used during World War II having improvement using three rotors to
substitute letters, a plug board, and a reflecting rotor. The advancement in encryption
methods came with the existence of computers.
silicon
realization,
integrates
high-speed
encryption
and
decryption,
10
11
12
13
14
15
CHAPTER
3
DES ALGORITHM
Data Encryption Standard (DES) is a cryptographic standard that was proposed as
the algorithm for secure and secret items in 1970 and was adopted as an American federal
standard by National Bureau of Standards (NBS) in 1973. DES is a block cipher, which
means that during the encryption process, the plain-text is broken into fixed length blocks
and each block is encrypted at the same time. Basically it takes a 64 bit input plain text
and a key of 64-bits (only 56 bits are used for conversion purpose and rest bits are used
for parity checking) and produces a 64 bit cipher text by encryption and which can be
decrypted again to get the message using the same key.
I/O
Function
CLK
RESET
CEN
START
E/D
Encrypt 1 / Decrypt 0
MODE [1:0]
DES Mode
0 Single DES
1 Double DES
2 Triple DES
17
K1 [1:64]
K2 [1:64]
K3 [1:64]
D [1:64]
Q [1:64]
19
20
57
49
41
33
25
17
58
50
42
34
26
18
15
10
59
51
43
35
27
22
19
11
60
52
44
36
29
63
55
47
39
31
23
15
36
62
54
46
38
30
22
43
14
61
53
45
37
29
50
21
13
28
20
12
21
Round
Number
Number of
bits to rotate
11
12
13
14
15
16
22
14
17
11
24
28
15
21
10
13
23
19
12
26
19
16
27
20
13
25
41
52
31
37
47
55
31
30
40
51
45
33
48
37
44
49
39
56
34
53
43
46
42
50
36
29
32
58
50
42
34
26
18
10
60
52
44
36
28
20
12
17
62
54
46
38
30
22
14
25
64
56
48
40
32
24
16
33
57
49
41
33
25
17
41
59
51
43
35
27
19
11
49
61
53
45
37
29
21
13
57
63
55
47
39
31
23
15
25
26
32
13
10
11
12
13
19
12
13
14
15
16
17
25
16
17
18
19
20
21
31
20
21
22
23
24
25
37
24
25
26
27
28
29
43
28
29
30
31
32
33
27
28
10
11
12
13
14
15
13
15
11
10
12
15
14
13
10
12
11
14
13
11
15
12
10
15
12
11
14
10
13
10
11
12
13
14
15
13
15
11
10
12
15
14
13
10
12
11
14
13
11
15
12
10
15
12
11
14
10
13
10
11
12
13
14
15
14
11
13
12
10
29
13
15
14
12
10
11
14
11
10
13
12
15
13
10
15
11
12
14
10
11
12
13
14
15
14
15
13
12
11
13
10
14
12
11
15
13
15
11
12
10
14
10
13
15
14
11
12
10
11
12
13
14
15
13
14
10
11
12
15
13
11
15
12
10
14
10
12
11
13
15
14
15
10
13
11
12
14
10
11
12
13
14
15
12
10
11
15
13
14
14
11
12
13
15
10
11
10
13
15
12
14
11
12
14
13
15
10
10
11
12
13
14
15
10
15
13
14
11
10
15
12
13
14
11
14
115 5
12
10
13
11
30
12
15
10
11
14
13
10
11
12
13
14
15
11
14
15
13
12
10
10
14
12
15
13
11
113 12
14
10
15
11
13
10
15
14
12
10
11
12
13
14
15
15
11
10
14
12
15
13
10
12
11
14
11
12
14
10
13
15
14
10
13
15
12
11
31
0
16
1
7
2
20
3
21
29
1
12
15
28
23
17
26
18
31
10
2
32
8
27
24
3
14
9
19
13
30
22
11
25
9
13
17
21
25
29
40
48
16
56
24
64
32
39
47
15
55
23
63
31
17
38
46
14
54
22
62
30
25
37
45
13
53
21
61
29
33
36
44
12
52
20
60
28
41
35
43
11
51
19
59
27
49
34
42
10
50
18
58
26
57
33
41
49
17
57
25
33
34
CHAPTER
4
TWOFISH ALGORITHM
Twofish is a 128-bit block cipher proposed by Schneier et al. It can also work
with 192- or 256-bit key lengths. A Feistel network structure, which was made
specifically for DES algorithm and was a successful one, can also be used for Twofish
algorithm having 16 rounds. A Feistel network is a general method of transforming any
function (usually called the F function) into a permutation. It was invented by Horst
Feistel. In a Feistel network, the round function consists of taking one part of the data
being encrypted, feeding it into some key dependent function F, and then XORing the
result into another part of the block. Two rounds of Feistel network are known to be as
one cycle, therefore, Twofish algorithm is an 8-cycle algorithm having 16 rounds. The
structure of the Twofish algorithm is shown in figure 4.1. The only difference between
the two Feistel network structures is the two fixed rotations by one bit, performed
together with the XOR operations on outputs of the F-function.
Twofish exhibits fast and versatile performance across most platforms; it performs well
both in hardware and in memory-constrained environments. Twofish can be optimized
for speed, key setup, memory, code size in software, or space in hardware. Encrypt data
in less than 500 clock cycles per block on an Intel Pentium, Pentium Pro, and Pentium II,
for a fully optimized version of the algorithm.
The Twofish algorithm consists of two types of operations (as shown in figure 4.1)
Byte-oriented: It includes the whitening operation and F-function.
Non-byte-oriented: It includes two sub-key additions modular 2 32 comprising of 1-bit
rotates, addition with sub-keys, and PHT (pseudo-Hadamard transform).
36
37
38
z0
z1
z =
2
z
3
01
5B
EF
EF
EF
5B
EF
5B
EF
01
01
EF
5B
01
EF
5 B
y0
y1
y
2
y
3
where y3...y0 are consecutive bytes of the input 32-bit word (y3 is the most significant
byte), and z3...z0 form the output word.
This matrix multiplies a 32-bit input value by 8-bit constants, with all
multiplications performed (byte by byte) in the Galois field GF (28). The primitive
polynomial is x8 + x6 + x5 + x3 + 1. Only three different multiplications are used
effectively in the MDS matrix, namely multiplication
- by 5B16 = 0101 10112 (represented in GF(28) by a polynomial x6 + x4 + x3 + x + 1),
- by EF16 = 1110 11112 (x7 + x6 + x5 + x3 + x2 + x + 1), and
- by 0116 = 0000 00012 (equivalent element in GF(28) is just 1) - obviously the result is
equal to the input value.
MDS matrices are useful building blocks for ciphers because they guarantee a
certain degree of diffusion. If one of the input elements is changed, all the output
elements must change. If two input elements are changed, all but one of the output
elements must change, etc.
39
with the first output of F and then rotated right by one bit. The fourth word is
rotated left by one bit and then XORed with the second output word of F. Finally, the two
halves are exchanged. Thus,
, Fr ,1
R r 1, 0
R r 1,1
ROL R r ,3 ,1 Fr ,1
Rr 1, 2
Rr ,0
Rr 1,3
Rr ,1
r ,0
F R r , 0 , R r ,1 , r
ROR R r , 2 Fr , 0 ,1
Step 4: The results of the two h-functions are combined using a Pseudo-Hadamard
Transform (PHT), and two round key words are added.
Step 5: These two results are then XORed into the words on the right (one of which is
rotated left by one bit first, the other is rotated right by one bit afterwards).
Step 6: The left and right halves are then swapped for the next round.
Step 7: After all the rounds, the swap of the last round is reversed, and the four words are
XORed
with four more key words to produce the cipher-text, which is known as output
whitening.
40
CHAPTER
5
FPGA OVERVIEW
The Xilinx Spartan 3E (XC3S500) FPGA kit is used for implementation of
encryption algorithms [57]. The Xilinx ISE 9.2i tool is used for the design. Some
specifications of Spartan 3E kit are as following:
Upto 232 user I/O pins
Over 10,000 logic cells
2 line, 16 character LCD screen
PS/2 mouse or keyboard port
VGA display port
Two 9 pin RS 232 ports (DTE/DCE)
50 MHz clock oscillator
Chipscope SoftTouch debugging port
Eight discrete LEDs
Four slide switches
Four push-button switches
Speed Grade -4
FG320 package
PROM
Reprogrammable
42
EPROM
EEPROM
Flash
SRAM - volatile
43
44
45
CHAPTER
6
EXPERIMENTAL RESULTS
6.1 Simulation Results of DES Algorithm
64 bit (11111111111111110000000000000000
10101010101010100101010101010101)
function_select
1 for encryption
0 for decryption
data_in
64 bit (00000001001000110100010101100111
10001001101010111100110111101111)
lddata
data_out
64 bit (01101001101111101000010110110110
11111000001101011101000110011110)
47
reset
clock
core_busy
48
49
32 bit (11111111000000001111111100000000)
in2_ter128
32 bit (10101010101010101010101010101010)
in3_ter128
32 bit (01010101010101010101010101010101)
in4_ter128
32 bit (11001100110011001100110011001100)
in_Sfirst_ter128
32 bit (10011001100110011001100110011001)
in_Ssecond_ter128
32 bit (11110000000011111111000000001111)
in_key_up_ter128
32 bit (10011111100111111001111110011111)
in_key_down_ter128 :
32 bit (01100110011001100110011001100110)
out1_ter128
32 bit (10011011001110010101101010110000)
out2_ter128
32 bit (11111001110111000011000010110010)
out3_ter128
32 bit (11111111000000001111111100000000)
50
32 bit (10101010101010101010101010101010)
to_left_shift
32 bit (00110110011100101011010101100001)
from_right_shift
32 bit (10011001100110011001100110011001)
to_xor_with3
32 bit (01100011001001111100000000110100)
to _xor_with4
32 bit (01100000010001011010100100101011)
: "lcd_des.prj"
Input Format
: mixed
: No
: "lcd_des"
Output Format
: NGC
Target Device
: xc3s500e-4-fg320
: lcd_des
: Yes
: Auto
Safe Implementation
: No
FSM Style
: lut
RAM Extraction
: Yes
RAM Style
: Auto
ROM Extraction
: Yes
Mux Style
: Auto
Decoder Extraction
: Yes
: Yes
: Yes
: Yes
51
: Yes
ROM Style
: Auto
Mux Extraction
: Yes
Resource Sharing
: Yes
Asynchronous To Synchronous
: NO
Multiplier Style
: auto
: No
: Yes
: 500
: 24
Register Duplication
: Yes
Slice Packing
: Yes
: No
: Yes
: Yes
: Yes
: auto
: Yes
: Speed
Optimization Effort
:1
: lcd_des.lso
Keep Hierarchy
: No
RTL Output
: Yes
Global Optimization
Read Cores
: YES
: No
: No
52
:/
Bus Delimiter
: <>
Case Specifier
: Maintain
: 100
: 100
Verilog 2001
: Yes
: No
:5
Macro Statistics
64x6-bit ROM
:1
26-bit up counter
:1
1-bit register
:8
6-bit register
:1
7-bit register
:1
1-bit xor2
:1
# IOs
:9
# BELS
: 104
GND
:1
INV
:2
LUT1
: 25
LUT2
:1
LUT4
: 13
MUXCY
: 25
MUXF5
:7
MUXF6
:4
VCC
:1
XORCY
: 25
# FlipFlops/Latches
: 34
FD
: 33
FDR
:1
53
:7
SRL16
:7
# Clock Buffers
:1
BUFGP
:1
# IO Buffers
:8
:8
OBUF
Number of Slices
: 26 out of 4656
0%
: 34 out of 9312
0%
: 48 out of 9312
0%
: 41
:7
Number of IOs
:9
: 9 out of 232
3%
Number of GCLKs
: 1 out of
4%
24
54
Des_cipher_top
Key_scheduling
Des_top
Block_top
Add_key
E_expansion_function
IOs
BELS
GND
INV
LUT2
LUT2_D
LUT3
LUT3_D
LUT3_L
LUT4
LUT4_D
LUT4_L
MUXF5
MUXF6
VCC
FlipFlops/Latches
FDR
FDE
FDRS
I/O Buffers
IBUF
OBUF
BUFGP
(Clock)
198
18
1
1
2
2
10
1
1
11
119
415
1
1
2
318
11
70
12
1
57
187
660
1
1
21
27
37
2
1
347
4
65
121
32
1
144
176
368
1
48
190
96
32
1
-
144
48
48
-
80
-
10
1
68
2
66
1
1
56
110
61
49
1
11
132
1
186
116
70
1
176
112
64
-
144
96
48
-
80
32
48
-
55
Particulars
IOs
BELS
GND
INV
LUT2
LUT2_D
LUT3
LUT3_D
LUT3_L
LUT4
LUT4_D
LUT4_L
MUXF5
MUXF6
VCC
FlipFlops/Latches
FDR
FDE
FDRS
I/O Buffers
IBUF
OBUF
BUFGP (Clock)
S_box
80
257
1
158
65
32
1
-
S1_box
10
33
1
19
8
4
1
-
S2_BOX
10
33
1
19
8
4
1
-
S3_box
10
34
1
20
8
4
1
-
S4_box
10
34
1
20
8
4
1
-
S5_box
10
34
1
20
8
4
1
-
S6_box
34
34
1
20
8
4
1
-
S7_box
10
34
1
20
8
4
1
-
S8_box
10
35
1
20
-9
4
1
-
80
48
32
-
10
6
4
-
10
6
4
-
10
6
4
-
10
6
4
-
10
6
4
-
10
6
4
-
10
6
4
-
10
6
4
-
56
Particulars
Des_cipher_top
Key_scheduling
Des_top
Block_top
Add_key
E_expansion_function
No. of Slices
(4656)
188
275
142
28
No. of Slice
F/Fs (9312)
11
144
No. of 4-i/p
LUTs (9312)
15
332
505
238
48
Bonded IOBs
(232)
69
111
187
176
144
80
GCLKs (24)
57
Particulars
S_box
S1_box
S2_BOX
S3_box
S4_box
S5_box
S6_box
S7_box
S8_box
No. of Slices
(4656)
13
13
13
13
13
13
13
13
13
No. of Slice
F/Fs (9312)
No. of 4-i/p
LUTs (9312)
20
20
20
20
20
20
20
20
20
Bonded IOBs
(232)
10
10
10
10
10
10
10
10
10
GCLKs (24)
58
Des_cipher_top
Key_scheduling
Des_top
Block_top
Add_key
E_expansion_function
FSMs
4-bit adder
4-bit add/sub
Registers/FlipFlops
135
57
141
32-bit XOR2
6-bit XOR2
64*4-bit ROMs
59
Particulars
S_box
S1_box
S2_BOX
S3_box
S4_box
S5_box
S6_box
S7_box
S8_box
FSMs
4-bit adder
4-bit add/sub
Registers/FlipFlops
48-bit 16-1
MUX
32-bit XOR2
6-bit XOR2
64*4-bit
ROMs
60
Des_cipher_top
Key_scheduling
Des_top
Block_top
Add_key
E_expansion_function
round_counter_0 (FF)
des_out_ready (FF)
reset (PAD)
k3_47 (FF)
r_in_internal_o (FF)
r_in_internal_20 (FF)
r_in (PAD)
r_out (PAD)
x_in (PAD)
block7_out (PAD)
4.45
2
2.910
1.535
59/10
4.194
2
2.47
1.717
113/113
6.735
6
4.174
2.561
3147/209
10.513
8
2.748
7.765
1864/64
key (PAD)
x6_out
(PAD)
6.209
3
5.194
1.015
96/48
lddata (PAD)
data_ready_internal (FF)
3.63
2
2.833
0.840
11/11
k3_31 (FF)
key_out (PAD)
10.659
6
7.383
3.276
769/49
key_round_in (PAD)
r_in_internal (FF)
7.321
7
4.801
2.520
1886/249
core_busy (FF)
key_select
(PAD)
key_out (PAD)
12.083
1
8.010
4.073
739/48
17.48/17.94
18.00/18.00
key_select_0 (FF)
key_select (PAD)
4.571
1
3.863
0.708
70/70
24.47/24.81
24.00/25.00
18.55/18.91
19.00/19.00
7.19/7.53
7.00/7.00
8.83/10.83
9.00/11.00
core_busy (PAD)
4.31
1
3.68
0.447
2/2
17.19/17.52
17.00/17.00
4.937
2
4.490
0.447
48/48
61
157052
Memory (kB)
Particulars
S_box
153980
S1_box
158396
S2_BOX
155004
148860
147836
S3_box
S4_box
S5_box
S6_box
S7_box
S8_box
Timing
Constraint (1)
Block7_in
(PAD)
A (PAD)
A (PAD)
A (PAD)
A (PAD)
A (PAD)
A (PAD)
A (PAD)
A (PAD)
X7_out
(PAD)
SPO (PAD)
SPO (PAD)
SPO (PAD)
SPO (PAD)
SPO (PAD)
SPO (PAD)
SPO (PAD)
SPO (PAD)
9.295
8.964
8.947
8.947
8.964
8.964
8.964
8.964
9.295
Levels of Logic
7.061
6.740
6.740
6.740
6.740
6.740
6.740
6.740
7.061
2.234
2.224
2.207
2.207
2.224
2.224
2.224
2.224
2.254
Paths/Destination
Ports
688/82
84/4
84/4
84/4
84/4
84/4
84/4
84/4
100/4
11.36/11.70
7.75/8.09
9.02/9.34
7.98/8.34
7.73/8.08
7.53/7.88
7.58/7.94
8.92/9.28
8.67/9.02
11.00/11.00
8.00/8.00
9.00/10.00
8.00/8.00
8.00/8.00
8.00/8.00
7.00/7.00
9.00/10.00
9.00/9.00
152756
148860
148860
148860
148860
148860
148860
148860
148860
Source
Destination
Memory (kB)
62
394
692
192
374
655
192
data_input
256
data_output
256
f_128
704
1235
256
g_128
282
495
128
q0
18
32
16
q1
18
32
16
mds
57
102
64
mul_ef
16
mul_5b
16
pht
70
123
128
adder
encryption_round128
706
1239
384
decryption_round128
706
1239
384
h_128
240
423
104
keysched128
550
968
208
whit_keysched128
1803
3184
384
reed-solomon128
65
Particulars
mul01
mula4
mul55
mul87
mul5a
mul58
muldb
mul9e
mul56
mul82
mulf3
mul1e
mulc6
mul68
mule5
mul02
mula1
mulfc
mulc1
mul47
mulae
mul3d
mul19
mul03
66
1-bit xor3
1-bit xor4
8-bit xor8
32-bit xor2
4-bit xor2
4-bit
xor3
8-bit
xor4
16*4bit
ROM
s128
504
128
20
reed-solomon128
504
128
20
data_input
data_output
f_128
400
24
48
48
96
g_128
72
12
24
24
48
q0
q1
mds
72
12
mul_ef
mul_5b
10
pht
128
encryption_round128
400
24
48
48
96
decryption_round128
400
24
48
48
96
h_128
72
12
24
24
48
keysched128
272
24
48
48
96
whit_keysched128
1088
96
16
192
192
32
384
Particulars
adder
67
Particulars
1-bit xor2
1-bit xor3
1-bit xor4
mul01
mula4
mul55
10
mul87
mul5a
mul58
muldb
11
mul9e
mul56
mul82
mulf3
11
mul1e
mulc6
12
mul68
11
mule5
mul02
mula1
10
68
mulfc
10
mulc1
mul47
mulae
mul3d
mul19
mul03
69
IOs
BELS
LUT2
LUT3
LUT4
MUXF5
I/O
Buffers
IBUF
OBUF
s128
192
715
119
144
429
23
192
128
64
reed-solomon128
192
673
151
113
391
18
192
128
64
data_input
256
256
128
128
data_output
256
256
128
128
f_128
256
1243
258
296
681
256
192
64
g_128
128
498
128
47
320
128
96
32
q0
16
32
14
16
16
q1
16
32
14
16
16
mds
64
112
34
60
10
64
32
32
mul_ef
16
10
16
mul_5b
16
16
pht
128
125
85
36
128
64
64
encryption_round128
384
1251
257
237
745
12
384
256
128
decryption_round128
384
1251
257
237
745
12
384
256
128
h_128
104
426
91
42
290
104
72
32
keysched128
208
976
183
170
615
208
144
64
whit_keysched128
384
3227
585
633
1966
43
384
128
256
adder
63
Particulars
IOs
BELS
LUT2
LUT3
LUT4
MUXF5
mul01
mula4
mul55
mul87
mul5a
mul58
muldb
mul9e
mul56
mul82
mulf3
mul1e
mulc6
mul68
mule5
mul02
mula1
mulfc
mulc1
mul47
mulae
mul3d
mul19
mul03
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
6
8
8
8
10
10
12
8
9
11
11
11
12
8
3
9
11
10
8
10
9
10
8
3
2
2
2
3
4
3
5
3
1
3
3
2
1
3
1
2
5
2
1
4
2
5
2
1
1
2
3
2
1
2
5
1
4
4
5
1
3
1
5
5
4
5
5
8
4
4
8
4
8
6
5
4
4
8
1
4
2
8
-
1
1
2
1
1
1
1
-
I/O
Buffers
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
IBUF
OBUF
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
64
Source
Destination
s128
data_input
in_key_ts128(
PAD)
in_rs128
(PAD)
in_tdi (PAD)
data_output
f_128
Levels
of
Logic
Logic
Time
(ns)
Route Paths/
Time Destination
(ns)
Ports
out_Sfirst_ts128 10.764
(PAD)
out_Ssecond_rs 11.941
128 (PAD)
out_tdi (PAD)
4.910
7.306
3.458
8.010
3.931
4.490
0.420
in_tdo (PAD)
out_tdo (PAD)
4.910
4.490
0.420
up_out_f128
(PAD)
out_g128
(PAD)
out_q0 (PAD)
71.244
49
27.455
19
q0
low_in_f128
(PAD)
in_g128
(PAD)
in_q0 (PAD)
10.578
37.19
5
16.07
5
7.306
34.04
9
11.38
0
3.272
q1
in_q1 (PAD)
out_q1 (PAD)
10.578
7.306
3.272
mds
y2 (PAD)
z1 (PAD)
9.615
6.602
3.013
mul_ef
in_ef (PAD)
out_ef (PAD)
7.823
5.898
1.925
mul_5b
in_5b (PAD)
out_5b (PAD)
6.422
5.194
1.228
pht
down_in_pht
(PAD)
in2_adder
up_out_pht
49.066
(PAD)
out_carry_adder 6.236
33
25.93
1
5.194
23.13
5
1.042
reed-solomon128
g_128
adder
Delay
Time
(ns)
1951/64
CPU
Time
(s)
20.86 /
21.19
1939/64
19.30/
19.64
128/128
7.37/
7.70
128/128
7.69/
8.03
3891031348 93.83 /
68 / 64
94.16
109530836 / 37.20/
32
37.59
576/8
8.81/
9.14
576/8
9.64/
9.98
431/32
12.66/
13.00
35/8
7.45/
7.80
22/8
6.98/
7.41
13915/64
10.42/
10.77
6/2
6.84/
Elapsed Memory
Time (s) (kB)
21.00 /
21.00
19.00/
19.00
7.00/
7.00
8.00/
8.00
94.00/
94.00
37.00/
37.00
9.00/
9.00
9.00/
10.00
12.00/
13.00
8.00/
8.00
7.00/
7.00
10.00/
10.00
7.00/
165564
161468
146812
147836
185020
177468
148860
148860
151932
146812
147836
149884
147836
70
(PAD)
in2_ter128
(PAD)
(PAD)
out2_ter128
(PAD)
72.623
50
37.89
9
34.72
4
7.20
4334212114 96.28/
36 / 128
96.64
decryption_round128
in2_tdr128
(PAD)
out2_tdr128
(PAD)
72.623
50
37.89
9
34.72
4
187068
h_128
in_h128
(PAD)
out_h128
(PAD)
27.805
19
16.07
5
11.73
0
109530836 / 34.09/
32
34.42
34.00/
35.00
175804
keysched128
even_in_tk12
8 (PAD)
out_key_down_
tk128 (PAD)
69.899
48
36.49
1
33.40
8
4583479222 85.20/
4 / 64
85.55
85.00/
85.00
192508
whit_keysched128
in_key_twk12
8 (PAD)
out_K7_twk128
(PAD)
63.544
43
32.97
1
30.57
3
encryption_round128
7.00
96.00/
97.00
187068
202812
71
Particulars Source
mul01
mula4
mul55
mul87
mul5a
mul58
muldb
mul9e
mul56
mul82
mulf3
mul1e
mulc6
mul68
in_mul01
(PAD)
in_mula4
(PAD)
in_mul55
(PAD)
in_mul87
(PAD)
in_mul5a
(PAD)
in_mul58
(PAD)
in_muldb
(PAD)
in_mul9e
(PAD)
in_mul56
(PAD)
in_mul82
(PAD)
in_mulf3
(PAD)
in_mul1e
(PAD)
in_mulc6
(PAD)
in_mul68
Destination Delay
Time
(ns)
out_mul01 4.910
(PAD)
out_mula4
6.320
(PAD)
out_mul55 7.481
(PAD)
out_mul87 7.391
(PAD)
out_mul5a
7.506
(PAD)
out_mul58 6.697
(PAD)
out_muldb 7.608
(PAD)
out_mul9e
7.608
(PAD)
out_mul56 7.475
(PAD)
out_mul82 7.481
(PAD)
out_mulf3
7.608
(PAD)
out_mul1e
7.562
(PAD)
out_mulc6
7.586
(PAD)
out_mul68 7.992
Levels
of Logic
Route
Time
(ns)
0.420
Paths/
CPU
Elapsed
Destination Time (s) Time (s)
Ports
8/8
6.59/6.92 7.00/7.00
Memory
(kB)
Logic
Time
(ns)
4.490
5.194
1.126
18/8
7.09/7.44 7.00/7.00
146812
5.898
1.583
33/8
8.20/8.55 8.00/9.00
148860
5.898
1.493
28/8
5.898
1.608
30/8
7.25/7.59 7.00/7.00
147836
5.515
1.182
31/8
7.41/7.73 7.00/7.00
147836
5.898
1.710
43/8
7.45/7.78 8.00/8.00
147836
5.898
1.710
42/8
7.53/7.86 7.00/8.00
146812
5.898
1.577
28/8
7.25/7.59 7.00/7.00
147836
5.898
1.583
32/8
7.44/7.78 7.00/8.00
148860
5.898
1.710
40/8
7.59/7.92 8.00/8.00
147836
5.898
1.664
33/8
7.58/8.00 8.00/8.00
147836
5.898
1.688
41/8
7.51/7.86 7.00/8.00
147836
6.219
1.773
39/8
7.45/7.80 8.00/8.00
147836
147836
72
mule5
mul02
mula1
mulfc
mulc1
mul47
mulae
mul3d
mul19
mul03
(PAD)
in_mule5
(PAD)
in_mul02
(PAD)
in_mula1
(PAD)
in_mulfc
(PAD)
in_mulc1
(PAD)
in_mul47
(PAD)
in_mulae
(PAD)
in_mul3d
(PAD)
in_mul19
(PAD)
in_mul03
(PAD)
(PAD)
out_mule5
(PAD)
out_mul02
(PAD)
out_mula1
(PAD)
out_mulfc
(PAD)
out_mulc1
(PAD)
out_mul47
(PAD)
out_mulae
(PAD)
out_mul3d
(PAD)
out_mul19
(PAD)
out_mul03
(PAD)
7.531
5.898
1.633
29/8
7.34/7.70 8.00/8.00
147836
6.280
5.194
1.086
11/8
6.86/7.22 7.00/7.00
147836
7.646
5.898
1.748
32/8
7.39/7.75 7.00/8.00
147836
7.606
5.898
1.708
37/8
8.28/8.63 8.00/9.00
148860
7.577
5.898
1.679
40/8
8.55/8.89 9.00/9.00
146812
6.376
5.194
1.182
22/8
7.44/7.77 8.00/8.00
147836
6.779
5.515
1.264
31/8
7.45/7.80 8.00/8.00
147836
7.531
5.898
1.633
31/8
7.64/8.01 7.00/8.00
148860
6.818
5.515
1.303
36/8
7.53/7.89 8.00/8.00
147836
6.326
5.194
1.132
19/8
7.34/7.80 7.00/8.00
147836
73
CONCLUSION__________________________________________________
The information security can be easily achieved by using Cryptography technique. A large
number of encryption algorithms have been developed to secure our confidential data from
the hackers. But some algorithms have been broken by using Cryptanalysis method. A key is
the strongest point of any algorithm but it can become the weakest point if it is not secured.
Our information can be secured if it is encrypted by using multiple keys or a large bit stream
of key (i.e., 128 bit, 256 bit, etc.). But to achieve this a large computational time is
required, giving a large delay which can be harmful to us. The hacker can hack the
information during this time. The use of FPGAs can help us to improve this limitation
because FPGAs can give enhanced speed. This is due to fact that the hardware
implementation of most encryption algorithms can be done on FPGA.
In this thesis, DES encryption algorithm is implemented on Xilinx Spartan 3E (XC3S500)
FPGA kit. The Twofish encryption algorithm is analysed by using Xilinx ISE 9.2i tool.
___________
REFERENCES
[1] D. Kahn: The Codebreakers: the story of secret writing, MacMillan publishing, 1996.
[2] W. Diffie and M. Hellman, New Directions in Cryptography, IEEE Transaction on
Information Theory, Vol. IT-22, Nov. 1976, pp. 644-654.
[3] Ruth M. Davis, The Data Encryption Standard, Proceedings of Conference on Computer
Security and the Data Encryption Standard, National Bureau of Standards, Gaithersburg, MD,
Feb. 15, 1977, NBS Special Publication 500-27, pp 5-9.
[4] Whitfleld Diffie, Cryptographic Technology: Fifteen Year Forecast Reprinted by
permission AAAS, 1981 from Secure Communications and Asymmetric Crypto Systems. AAAS
Selecte8 Symposia. Editor: C.J. Simmons. Vol. 69, Westview Press, Boulder, Colorado, pp 3857.
[5] Ingrid Verbauwhede, Security and Performance Optimization of a New DES Data
Encryption Chip, IEEE journal of Solid-State Circuits, Vol. 23, No. 3. June 1988, pp 647-656.
[6] James E. Katz, Social Aspects of Telecommunications Security Policy, IEEE Technology
and Society Magazine, June/July 1990, pp 16-24.
[7] H. Bonnenbergt, VLSI Implementation of a New Block Cipher, IEEE 1991, pp 510-513.
[8] K.H. Mundt, SUPERCRYPT, ASIC Technology facilitates a new Device Family for Data
Encryption, IEEE 1992, pp 356-359.
[9] C. Boyd. Modern Data Encryption, Electronics & Communication Engineering Journal,
October 1993, Vol. 5, pp 271-278
[10] A. Curiger, VINCI: VLSI Implementation of the New secret-key block Cipher IDEA,
IEEE 1993 Custom Integrated Circuits Conference, pp 1-4.
[11] R. Zimmermann, A 177 Mb/s VLSI Implementation of the International Data Encryption
Algorithm, IEEE Journal of Solid-State Circuits. Vol. 29, No. 3, March 1994, pp 303-307.
[12] Stefan Wolter, On the VLSI Implementation of the International Data encryption Algorithm
IDEA, IEEE 1995, pp 397-400.
[13] Seung-Jo Han, The Improved Data Encryption Standard (DES) Algorithm IEEE 1996,
Vol. 3, pp 1310-1314.
[14] Toby Schaffer, A Flip-Chip Implementation of the Data Encryption Staiidard (DES), IEEE
1997, pp 13-17.
[15] Suan-Suan Chew, IAuth: An Authentication System for Internet Applications, Computer
Software and Applications Conference, 1997 COMPSAC '97 Proceedings., The Twenty-First
Annual International, IEEE 1997, pp 654-659.
75
[16] Hassina Guendouz, Rapid Prototype of a Fast Data Encryption Standard with Integrity
Processing for Cryptographic Applications, IEEE 1998, pp 434-437.
[17] K. Wong, A Single-Chip FPGA Implementation of the Data Encryption Standard (DES)
Algorithm Global Telecommunications Conference, 1998. GLOBECOM 98, IEEE,
Vol. 2, pp 827-832
[18] Yeong-Kang Lai, A Novel VLSI Architecture for a Variable-Length Key, 64-Bit Blowfish
Block Cipher, Signal Processing Systems, 1999 IEEE Workshop, pp 568-577.
[19] M.P. Leong, A Bit-Serial Implementation of the International Data Encryption Algorithm
IDEA, 2000 IEEE Symposium on Field-Programmable Custom Computing Machines, pp 122131.
[20] R. G. Sixel, A High Level Language Implementation of the Data Encryption Standard and a
Bit-Slice Architecture, Roc 43rd IEEE Midwest Symp on Crcuits and Systems, Lansing MI, Aug
8-11, 2000, pp 266-269.
[21] Teo Pock Chueng, Implementation of Pipelined Data Encryption Standard (DES) Using
Altera CPLD, TENCON 2000 Proceedings, Vol. 3, IEEE 2000, pp 17-21.
[22] Cameron Patterson,High Performance DES Encryption in Virtex FPGAs using Jbits, IEEE
2000, pp 113-121.
[23] Pui-Lam Siu, A Low Power Asynchronous DES, Circuits and Systems, ISCAS 2001 IEEE
International Symposium, Vol. 4, pp 538-541.
[24] N. Sklavos, Asynchronous Low Power VLSI Implementation of the International Data
Encryption Algorithm, Electronics Circuits and Systems ICECS 2001, 8th IEEE International
Conference Vol. 3, pp 1425-1428.
[25] Ahmet Eskicioglu, Cryptography, IEEE Potentials 2001, pp 36-38.
[26] Deng Liang, An Efficient and Scalable VLSI Implementation of DES, ASIC 2001
Proceedings 4th International Conference IEEE 2001, pp 341-343.
[27] Yeong-Kang Lai, VLSI Architecture Design and Implementation for Twofish Block
Cipher, IEEE 2002, pp 356-359.
[28] Touria ARICH, Hardware implementations of the Data Encryption Standard, IEEE 2002,
pp 100-103.
[29] Chih-Chung Lu, Integrated Design of AES (Advanced Encryption Standard) Encrypter and
Decrypter, Proceedings of the IEEE International Conference on Application-Specific Systems,
Architectures, and Processors (ASAP02).
[30] G. Catalini, Modified Twofish Algorithm for increasing Security and Efficiency in the
Encryption of Video signals, IEEE 2003, pp 525-528.
76
[31] M. McLoone, High-performance FPGA implementation of DES using a novel method for
implementing the key schedule, IEE Proc.-Circuits Devices Syst., Vol. 150, No. 5, October
2003, pp 373-378.
[32] Bo Yang, Scan Based Side Channel Attack on Dedicated Hardware Implementations of
Data Encryption Standard, ITC International Test Conference IEEE 2004, pp 339-344.
[33] Liakot Ali, Implementation of Triple Data Encryption Algorithm using VHDL, ICSE2004,
Proc. 2004, Kuala Lumpur, Malaysia, pp 369-373.
[34] Tariq Jamil, The Rijndael Algorithm: A brief introduction to the new encryption standard,
IEEE Potentials 2004, pp 36-38.
[35] Aamer Nadeem, A Performance Comparison of Data Encryption Algorithms, IEEE 2005,
pp 84-89.
[36] A.Ammar, Random Data Encryption Algorithm (RDEA), Twenty Second National Radio
Science Conference (NRSC 2005), Cairo-Egypt, pp 1-8.
[37] Jingmei Liu, An AES S-box to Increase Complexity and Cryptographic Analysis,
Proceedings of the 19th International Conference on Advanced Information Networking and
Applications (AINA05) Vol. 1, pp.724-728.
[38] Chih-Hsu Yen, Simple Error Detection Methods for Hardware Implementation of
Advanced Encryption Standard, IEEE Transactions on Computers, Vol. 55, No. 6, June 2006, pp
720-731.
[39] Alireza Hodjat, Area-Throughput Trade-Offs for Fully Pipelined 30 to 70 Gbits/s AES
Processors, IEEE Transactions on Computers, Vol. 55, No. 4, April 2006, pp 366-372.
[40] A.Chandra Sekhar, Data Encryption technique using Random number generator, 2007
IEEE International Conference on Granular Computing, pp 576-579.
[41] M.R.M. Rizk, Optimized Area and Optimized Speed Hardware Implementations of AES on
FPGA, International Design and Test Workshop, 2007 2nd, IEEE 2007, pp 207-217.
[42] Jing Wang, Improved DES Algorithm based on Irrational Numbers, IEEE Int. Conference
Neural Networks & Signal Processing Zhenjiang, China, June 8~10, 2008, pp 632-635.
[43] Md. Nazrul Islam, Effect of Security Increment to Symmetric Data Encryption through
AES Methodology, Ninth ACIS International Conference on Software Engineering, Artificial
Intelligence, Networking, and Parallel/Distributed Computing IEEE 2008, pp 291-294.
[44] Sapiee Haji Jamel, Mustafa Mat Deris, Diffusive primitives in the Design of Modern
Cryptographic Algorithms, Proceedings of the International Conference on Computer and
Communication Engineering 2008 May 13-15, 2008 Kuala Lumpur, Malaysia, pp 707-710.
[45] Hung-Min Sun, On the Security of an Efficient Time-Bound Hierarchical Key Management
Scheme, IEEE transactions on dependable and secure computing, Vol. 6, No. 2, April-June
2009, pp 159-160.
77
[46] Tingyuan Nie, A Study of DES and Blowfish Encryption Algorithm, IEEE 2009, pp 1-4.
[47] Ashwini M. Deshpande, FPGA Implementation of AES Encryption and Decryption,
International Conference on Control, Automation, Communication and Energy Conservation 2009, 4th-6th June 2009, pp 1-6.
[48] agents.csie.ntu.edu.tw/~yjhsu/courses/u2010/2004/040317.pdf
[49] Nazar A. Saqib, A Compact and Efficient FPGA Implementation of the DES Algorithm,
islab.oregonstate.edu/papers/FRH/des (8).pdf
[50] CISSP All-in-One Certification Exam Guide, by Shon Harris
[51] William M. Daley, Data Encryption Standard (DES), Federal Information Processing
Standards Publication Reaffirmed 1999 October 25, pp 1-22.
[52] Ultra-Compact Data Encryption Standard Core, IP cores @ www.ipcores.com
[53] http://www.kremlinencrypt.com/algorithms.htm
[54] http://orlingrabbe.com/des.htm
[55] www.schneier.com/paper-twofish-fpga.pdf
[56] www.schneier.com/paper-twofish-paper.pdf
78