Encryption is an important topic in the world of security. Before going in this subject, it is important to differentiate between computer security and network security. Computer security refers to securing the data on the computer from viruses and hackers while network security refers to securing the data while traveling on the network links.
Encryption is one part of network security and it refers to hiding the sensitive data while traveling on the network. This is done because there are some programs allowed to read this data which may be sensitive to disclose as with credit card numbers and passwords.
There are two major types of algorithms for implementing encryption: symmetric encryption and asymmetric encryption. In symmetric encryption, the data are scrambled using one key on the transmitter and then is processed at the receiver using the same key. Thus the two keys are the same for the data to be readable.
On the other hand, asymmetric encryption, the another type, uses two different keys at the transmitter and the receiver to encrypt the data, one is called public key and the other is called private key. The public key must be known to everyone who wants to communicate with the person owning that key but the private key must not be known for the encryption to be successful.
Each of the above techniques has its uses and advantages. The symmetric encryption is used on usual data transfer but its difficulties arise because of a broad subject called key sharing in which the key must be shared between the transmitter and the receiver in a safe manner without disclosing it. Often we find that the public key encryption is used in key sharing while symmetric key encryption is used to transfer the data. Thus the overall encryption system on modern devices can use the two techniques together.
Some examples of symmetric encryption are DES and AES. they use similar operations to perform the encryption. all these operations are based on replacement and scrambling. that means some bytes are replaced with other bytes according to some rules. also the data bytes are transferred from locations to other locations according to the rules of the algorithm.
In public key, the data are encrypted according to mathematical operations and not alteration or replacement of bytes by other bytes. thus they use totally different algorithms. examples on them are RSA algorithm which uses public and private keys.
As stated previously, asymmetrical and symmetrical encryption are integrated in many applications and each one is used for its own purpose. so no one of them are abandoned.while symmetric are used for regular encryption, we find that asymmetrical encryption are used for key sharing to transmit the keys between the transmitter and the receiver.
It must be noted that each algorithm has its own features that depend on the operations involved in the algorithm. the most important factor that determines that the algorithm is strong is the key size. In DES it is 58 bit while in AES it is 128 bits so AES is more stronger or harder to be attacked.