## What Will We Cover?

In this guide, we will learn about the difference between two broad categories of cryptographic techniques: Symmetric and Asymmetric Key ciphers (cryptography).

## Symmetric Key Encryption (Cipher)

Symmetric Key Encryption or Symmetric Cipher, also called Secret Key Cryptography, employs a single key for encrypting and decrypting a message. Its primary use is in the implementation of privacy and confidentiality.

There are three operations in Symmetric encryption namely: key generation, encryption, and decryption. Here, a sender encrypts a plain text message with a secret key to generate a ciphertext. The sender then sends this encrypted message to the receiver. The receiver on getting the encrypted message decrypts it with the same decryption key as that of the sender.

Symmetric Encryption Algorithms are of two types. The first one is a block cipher and the second is a stream cipher.

In block cipher, the message is divided into fixed-size blocks and each is encrypted separately. Block ciphers are a preferred choice for encrypting MAC and network layer datagrams. AES, DES, and 3DES are examples of block ciphers.

In a stream cipher, data is treated as a continuous stream. The plain text is processed one byte at a time. They have a lower error propagation rate. RC4 is an example of a stream cipher. By the way, RC4 is used in the Transport Layer Security (TLS) protocol.

## Advantages of Symmetric Encryption

Symmetric encryption operates in a more efficient and faster way. It also requires less time for execution. They are therefore preferred for long messages.

Producing a strong key and processing algorithms for Symmetric Encryption are both relatively less expensive.

It also provides a degree of authentication as a single key is used to encrypt the data and only that key can be used to decrypt the data. Therefore, as long as the key is kept secret by the sender and receiver, confidentiality is assured between them.

## Disadvantages of Symmetric Encryption

The key used for encryption and decryption is a critical element of this algorithm. If the key is compromised, anyone possessing it can easily decrypt the message. Non-repudiation, which means a sender or a receiver cannot deny performing an action, is not provided by symmetric encryption.

Another major problem with symmetric encryption is related to the transmission of a key over an insecure medium. This is referred to as the key distribution problem.

It also requires a large number of unique keys, e.g., we will need n(n-1)/2 keys for n users.

## Asymmetric Key Encryption (Cipher)

Asymmetric Key Encryption or Asymmetric Cipher, also called Public Key Cryptography, employs one key for encrypting and another for decrypting the message. Its primary use is in the implementation of authentication, non-repudiation, and key exchange.

Messages can be encrypted by anyone using the public key of the receiver but can be decrypted by only using the private key of the receiver.

## Advantages of Asymmetric Encryption

In the case of Asymmetric Encryption, the public key can be easily distributed as compared to the secret key of Symmetric encryption. Digital signing for security implementation is only possible with Asymmetric encryption. It is also the best fit for both the intranet and the internet. Application areas like session initiation generally use asymmetric encryption.

It requires a small number of keys and a pair of keys for one entity to be used with any other entity.

Asymmetric key encryption is implemented in the RSA algorithm and Diffie Hellman key exchange algorithm.

## Disadvantages of Asymmetric Encryption

Asymmetric encryption is comparatively slower than a symmetric algorithm and also utilizes more resources. It is not efficient for sending long messages. It also requires verification between an entity and its public key.

They suffer from the problem of key validation. Suppose Alice sends a message to Bob using his public key. The question is how Alice will assure it is Bobâ€™s public key? Suppose Charlie somehow manages to get Bob’s public key and re-encrypts Alice’s message and sends it to Bob as if it had come directly from Alice. Bob will decrypt the message using his private key thinking that it had come directly from Alice. Another situation is that Charlie may impersonate Bob and publish a new public key in Bob’s name.

## Conclusion

The advancement in the area of cryptography has revolutionized various sectors like finance, e-commerce, military warfare, etc. Symmetric and asymmetric encryption are both necessary, the option to choose one depends on the application area. This is the reason why both exist in parallel.