Data Structuresand Algorithms Good OldJava AdvancedInterview Topics Cloud andDatabases Web Designand Development Must-knowTools Good ToKnow

## DES (Data Encryption Standard) Algorithm

DES was one of the earliest official encryption algorithms. It was developed by IBM in 1970 and was subsequently adopted as a standard in 1977. But in current times, it is considered insecure because it has been proved to be vulnerable to brute force attack given the substantial increase in today’s computing power as compared to the 1970s.

DES uses a small key-size of 56 bits to encrypt data and it is this small key size that makes it vulnerable to brute force attack - an attack that tries every possible combination of the key until it succeeds. For a 56 bit key length, 256 keys are possible and a brute force algorithm will try all of these to break the encryption.

In 2006, a hardware machine COPACABANA was built which substantially parallelized the generation of keys and decryption process to demonstrate publicly that DES algorithm based encryption can be broken down in no more than 2 days. Since then, the brute force attack has been optimized even more to break DES in less than a day.

## Triple DES

To overcome the shortcomings of DES algorithm, Triple DES was introduced which as the name suggests, uses DES three times to offer better protection against brute force attack.

Triple DES uses the following algorithm:

ciphertext = EK3(DK2(EK1(non-encrypted material)))

Decryption performs the above in opposite order:

decrypted material = DK1(EK2(DK3(ciphertext)))

Here EK3 and EK1 are encryption algorithms and DK2 is a decryption algorithm.

T-DES thus encrypts with key K1, then decrypts with key K2 and then encrypts again with yet another key K3.

Since DES key size is 56 bits, the T-DES offers a protection equivalent to key-size of 3x56 = 168 bits. T-DES comes in 3 variants, each with different key-size:

1. All keys are different. This is the strongest encryption type in T-DES with protection of 168 bits.

2. Two keys (K1 and K3) same. This provides a protection equal to 2x56 = 112 bits

3. All 3 keys same. This reduces to the plain DES algorithm with protection = 56 bits.

The strongest variant of T-DES with protection of 168 bits is considered practically immune to brute force attack for a long time to come.

## AES (Advanced Encryption Standard) Algorithm

While DES is no longer secure, T-DES offers security but is very slow. Another algorithm developed in 2001 and adopted widely as a standard since 2002 is AES. AES offers key-size protection in 128, 192 and 256 bit flavours and is much faster as compared to T-DES.

AES protection is infact so perfect that by today’s computing standards it will take a trillion normal machines, billions of years to crack an AES key. Yet experts expect the AES algorithm to be breakable in the next 30 odd years due to advances in hardware, algorithms and paradigm changes in computing such as the advent of quantum computers.

Like us on Facebook to remain in touch
with the latest in technology and tutorials!

Got a thought to share or found a
bug in the code?
We'd love to hear from you:

 Name: Email: (Your email is not shared with anybody) Comment: