SYMMETRICAL CRYPTOGRAPHY



GENERAL IDEA:

Main idea concerning symmetrical cryptography assumes that one key is used both to encrypt and to decrypt dataset or message. Two hypothetical network users, Alice and Bob, have to share the same secret key. If they want to send message, they use the same tool to encrypt/decrypt data. In comparison to asymmetrical algorithms, symmetrical ones are much faster, that is why their usage is so wide-spread.


The key is "put into the padlock" by Alice, than cipherthext is sent to the receiver. As in one kit with padlock are always two keys, second in this example belongs to Bob who "opens" the message. If the key they use is long enough, they can safely communicate through the net.

The main assumption that needs to be done is the key security. Possible attacker has to know the key, an algorithm is published. That is why the key-lenght plays such an important role. The most common algorithms used in symmetrical cryptography are DES, 3DES and IDEA. In the following part these keys' are presented. Also on an example file outputs produced by DES, 3DES and IDEA is given.


DATA ENCRYPTION STANDARD - DES

DES is also known as the Data Encryption Algorithm (DEA), which has been a worldwide standard for 20 years. During this time this tool was respond to attacks from cryptanalysis and DES's impact on cryptography in general is very significant. This science was up to DES time used only in military issues and everything was secret. Main advantage of algorithm's publishing was that the public debate has improved it and possible gaps have been fixed.

DES key to encrypt/decrypt messages is 64-bits long (contains 64 "0" and "1") of which 56 bits are randomly generated and used for error detection. The algorithm is designed to encipher and decipher blocks of data consisting of 64 bits. A block to be enciphered is subjected to an initial permutation IP, then to a complex key-dependent computation and finally to a permutation which is the inverse of the initial permutation IP-1. At its simplest level, the algorithm is nothing more than a combination of two basic techniques of encryption: confusion and diffusion. Algorithm operates in 16 rounds.
For specific information about DES standard click the following link.

But how does it work?

I created a sample file symmetrical.txt. Then I encrypted it into another file symmetrical.des by using the following commends:



Passwords written need to be the same when encrypting and decrypting file, also in 3DES and IDEA algorithm.




DATA ENCRYPTION STANDARD - 3DES

Security of DES has been questioned for many years. Although IBM claimed that the inner workings were the result of 17 man-years of intensive cryptanalysis, some people did not believed in DES as unbreakable algorythm. As the processors became more efficient, a need for improccurreds occured.

As written above, DES is a block cipher - i.e. it acts on a fixed-length block of plaintext (64 bits) and converts it into a block of ciphertext of the same size by using the secret key (also 64 bits) but 8 bits are used for parity. Hence the effective key length is only 56 bits. In 3DES, 3 stages of DES are applieseparate seperate key for each stage. So the key length in 3DES is 168 bits. Decryption is done by applying the reverse transformation to the block of ciphertext using the same key. Since the same key is used both in encryption and decryption, DES is a symmetric key cipher.
For specific information about 3DES standard click the following link.

Practical example:

Also in this case sample file called symmetrical.txt is used. The output file is called symmetrical.3des The whole process was conducted by using the following commends:




INTERNATIONAL DATA ENCRYPTION ALGORITHM - IDEA

This cipher was designed by Xueija Lai and James Massey. According to Bruce Schneier, an authority in cryptography issues this is the best and most strong block algorithm available to the public at this time. Although it is very efficient DES still is the standard. Why IDEA is so impressive?

As the previos ones IDEA is a block cipher operatingon 64-bit plaintext blocks with 128 bits long symmetric key. Although it also uses both confusion and diffusion there are significant differences in comparison to previous algorithms. Operations from three algebraic groups are being mixed but this aeasily is easly implemented in hardware and software. All this operations operate on 16-bit sub-blocks, so it can be used even on 16-bit processors. The 64-bits data block is divided into four sub-blocks, which are an input to the first (out of eight) round.
For specific information about 3DES standard click the following link.

Practical example:

The file symmetrical.txt turned out to be very useful, because it is used also in this example. The output file is called symmetrical.idea The whole process was conducted by using the following commends:



Back to the the "Workshop 1" site, or to the home page