Design and Implementation of Triple DES Encryption Scheme
Design and Implementation of Triple DES Encryption Scheme
Design and Implementation of Triple DES Encryption Scheme
Abstract—The speed of exhaustive key searches against DES after 1990 began to cause discomfort amongst users of DES. However, users did
not want to replace DES as it takes an enormous amount of time and money to change encryption algorithms that are widely adopted and
embedded in large security architectures. The DES algorithm was replaced by the Advanced Encryption Standard (AES) by the National
Institute of Standards and Technology (NIST). The pragmatic approach was not to abandon the DES completely, but to change the manner in
which DES is used. DES is often used in conjunction with Triple DES. It derives from single DES but the technique is used in triplicate and
involves three sub keys and key padding when necessary, such as instances where the keys must be increased to 64 bits in length. Known for its
compatibility and flexibility, software can easily be converted for Triple DES inclusion. Therefore, it may not be nearly as obsolete as deemed
by NIST. This led to the modified schemes of Triple DES (sometimes known as 3DES).3DES is a way to reuse DES implementations, by
chaining three instances of DES with different keys. 3DES is believed to still be secure because it requires 2^112 brute-force operations which is
not achievable with foreseeable technology. While AES is a totally new encryption that uses the substitution-permutation network, 3DES is just
an adaptation to the older DES encryption that relied on the balanced Feistel network. But since it is applied three times, the implementer can
choose to have 3 discrete 56 bit keys, or 2identical and 1 discrete, or even three identical keys. This means that 3DES can have encryption key
lengths of 168, 112, or 56 bit encryption key lengths respectively. But due to certain vulnerabilities when reapplying the same encryption thrice,
it leads to slower performance. In this paper we present a pipelined implementation in VHDL, in Electronic Code Book (EBC) mode, of this
commonly used Cryptography scheme with aim to improve performance. We achieve a 48-stage pipeline depth by implementing a TDES key
buffer and right rotations in the DES decryption key scheduler. We design and verify our implementation using ModelSim SE 6.3f and Xilinx
ISE 8.1i. We gather cost and throughput information from the synthesis and Timing results and compare the performance of our design to
common implementations presented in other literatures.
The round takes LI−1 and RI−1 from previous round (or the
initial permutation box) and creates LI and RI, which go to the
next round (or fi nal permutation box). We can assume that
each round has two cipher elements (mixer and swapper).
Each of these elements is invertible. The swapper is obviously
Figure 5: Encryption and Decryption With DES invertible. It swaps the left half of the text with the right half.
DES Structure The mixer is invertible because of the XOR operation. All
102
IJRITCC | March 2018, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 6 Issue: 3 100 – 106
___________________________________________________________________________________ ___________
noninvertible elements are collected inside the function f Cipher and Reverse Cipher
(RI−1, KI). Using mixers and swappers, we can create the cipher and
reverse cipher, each having 16 rounds. The cipher is used at
the encryption site; the reverse cipher is used at the decryption
site. The whole idea is to make the cipher and the reverse
cipher algorithms similar. To achieve this goal, one approach
is to make the last round (round 16) different from the others;
it has only a mixer and no swapper.
Key Generation
The round-key generator creates sixteen 48-bit keys out of a
56-bit cipher key. However, the cipher key is normally given
as a 64-bit key in which 8 extra bits are the parity bits, which
are dropped before the actual key-generation process.
Compression P-BOX
The pre-processor before key expansion is a compression
transposition step that we call parity bit drop. It drops the
parity bits (bits 8, 16, 24, 32… 64) from the 64-bit key and
Figure 7: ROUND IN DES permutes the rest of the bits according to Table 6.12. The
remaining 56-bit value is the actual cipher key which is used
Expansion Permutation to generate round keys. The parity drop step (a compression
Since RI−1 is a 32-bit input and KI is a 48-bit key, we fi rst D-box).
need to expand RI−1 to 48 bits. RI−1 is divided into 8 4-bit
sections. Each 4-bitsection is then expanded to 6 bits. This Shift Left
expansion permutation follows a predetermined rule. For each After the straight permutation, the key is divided into two 28-
section, input bits 1, 2, 3, and 4 are copied to output bits 2, 3, bit parts. Each part is shifted left (circular shift) one or two
4, and 5, respectively. Output bit 1 comes from bit 4 of the bits. In rounds 1, 2, 9, and 16, shifting is one bit; in the other
previous section; output bit 6 comes from bit 1 of the next rounds, it is two bits. The two parts are then combined to form
section.Although the relationship between the input and output a 56-bit part. Table 3.5 shows the number of shifts for each
can be defined mathematically, DES uses Table to define this round.
D-box. Note that the number of output ports is 48, but the
value range is only 1to 32. Some of the inputs go to more than Compression D-BOX
one output. For example, the value of input bit 5 becomesthe The compression D-box changes the 58 bits to 48 bits, which
value of output bits 6 and 8. are used as a key for a round.
Keying option 3
All three keys are identical, i.e. K1 = K2 = K3. This is
backward compatible with DES, since two operations cancel
out. ISO/IEC 18033-3 never allowed this option, and NIST no
longer allows it. Each DES key is 8 odd-parity bytes, with 56
bits of key and 8 bits of error-detection. A key bundle requires
24 bytes for option 1, 16 for option 2, or 8 for option 3
Initial Permutation
This permutation is keyless straight permutation that is the
inverse of final permutation. For example, in the initial
permutation, the 58th bit in the input becomes the first bit in
the output.
S BOX
Expansion Permutation
The right 32bits of the plain text gets expanded into 48 bits
after passing through the expansion permutation block.
Final Permutation
In the final permutation, the first bit in the input becomes the
58th bit in the output.
106
IJRITCC | March 2018, Available @ http://www.ijritcc.org
_______________________________________________________________________________________