Introduction to 3DES
Cryptographic
Symmetric Key Cryptography
The DES most widely used symmetric key cryptographic method is the Data Encryption Standard (DES) as shown in below Figure 3.1: It uses a fixed length, 56-bit key and an efficient algorithm to quickly encrypt and decrypt messages. It can be easily implemented in the encryption and decryption process even faster. In general, increasing the key size makes the system more secure. A variation of DES, called Triple- DES or DES - EDE (Encrypt-Decrypt-Encrypt), uses three applications of DES and two independent DES keys to produce an effective key length of 168 bits.
Figure 3.1: Symmetric Key – Triple DES
Despite the efficiency of symmetric key cryptography, it has a fundamental weak spot-key The International Data Encryption Algorithm (IDEA) was invented by James Massey 1991. IDEA uses a fixed length, 128-bit key (larger than DES but smaller than Triple-DES). It is also faster than Triple- DES. In the early 1990s, Don Rivest of RSA Data Security, Inc., invented the algorithms RC2 and RC4. These use variable length keys and are claimed to be even faster than IDEA.
Implementation of Triple DES (3DES)
In 1998 a standard ANS X9.52 and named Triple Data Encryption Algorithm (TDEA).
- Block cipher with symmetric secret key
- Block length = 64 bits
- Key length = 56, 112 or 168 bits
3DES was created because DES algorithm, invented in the
early 1970s using 56-bit key. The effective security 3DES
provides is only 112 bits due to meet-in-the-middle attacks.
Triple DES runs three times slower than DES, but is much
more secure if used properly. The procedure for decrypting
something is the same as the procedure for encryption, except
it is executed in reverse. In DES, data is encrypted and
decrypted in 64 -bit chunks. The input key for DES is 64 bits
long; the actual key used by DES is only 56 bits in length.
The least significant (right-most) bit in each byte is a parity bit, and should be set so that there are always an odd number of 1s in every byte. These parity bits are ignored, so only the seven most significant bits of each byte are used, resulting in a key length of 56 bits. This means that the effective key strength for Triple DES is actually 168 bits because each of the three keys contains 8 parity bits that are not used during the encryption process.
Figure 3.2: Triple DES Using 64 bytes
The above Figure 3.2 as shown in Triple Data Encryption Standard (DES) is a type of computerized cryptography where block cipher algorithms are applied three times to each data block. The key size is increased in Triple DES to ensure additional security through encryption capabilities. Each block contains 64 bits of data. Three keys are referred to as bundle keys with 56 bits per key. There are three keying options in data encryption standards:
- All keys being independent
- Key 1 and key 2 being independent keys
- All three keys being identical
Key option 3 as shown in Figure 3.3: triples DES. The triple
DES key length contains 168 bits but the key security falls to
112 bits.
Figure 3.3: Working of Triple DES
(i) Algorithm:
Run DES three times:
ECB mode:
Backwards compatibility
Has 112 bits of security, not 3 56 = 168
Triple DES algorithm uses three iterations of common DES cipher. It receives a secret 168-bit key, which is divided into three 56-bit keys.
- Encryption using the first secret key
- Decryption using the second secret key
- Encryption using the third secret key
Encryption:
c = E3 (D2 (E1 (m)))
Decryption:
m = D1 (E2 (D3(c)))
Using decryption in the second step during encryption provides backward compatibility with common DES algorithm. In these case first and second secret keys or second and third secret keys are the same whichever key.
c = E3 (D1 (E1 (m))) = E3 (m)
c = E3 (D3 (E1 (m))) = E1 (m)
It is possible to use 3DES cipher with a secret 112-bit key. In this case first and third secret keys are the same.
c = E 1 (D 2 (E 1 (m)))
Triple DES is advantageous because it has a significantly sized key length, which is longer than most key lengths affiliated with other encryption modes. DES algorithm was replaced by the Advanced Encryption Standard and Triple DES is now considered to be obsolete. It derives from single DES but the technique is used in triplicate and involves three sub keys and key padding when necessary. Keys must be increased to 64 bits in length Known for its compatibility and flexibility can easily be converted for Triple DES inclusion. The following Figure 3.4 and Figure 3.5 is the block diagram of 3DES as shown in below.
Figure 3.4: Block Diagrams: 3DES Encryption
Figure 3.5: Block Diagrams: 3DES Decryption