Cryptography

Encryption vs Encoding

Nitesh Malviya
September 23, 2020 by
Nitesh Malviya

Encryption and decryption

Encryption is the process of converting plaintext to encrypted text. Since encrypted text cannot be read by anyone, encrypted text hides the original data from unauthorized users. The process entailing encryption and decryption together is called cryptography. The unencrypted data is called plaintext, while the encrypted data is called ciphertext. The algorithms used to encrypt and decrypt messages are called encryption algorithms.

Decryption is the process of converting encrypted data to plaintext. Basically, it is the reverse of encryption. It is used to decrypt the encrypted data so that only an authorized user can access and read the data. The authorized user uses a pre-shared secret key for converting encrypted data to plaintext.

Learn Applied Cryptography

Learn Applied Cryptography

Build your applied cryptography and cryptanalysis skills with 13 courses covering hashing, PKI, SSL/TLS, full disk encryption and more.

 

Difference between encryption and decryption

Encryption Decryption

Encryption is a process in which a plaintext message is converted into encrypted form.     Decryption is a process in which an encrypted message is converted into its plaintext form.

Encryption takes place at the sender’s end.                                             Decryption takes place at the receiver’s end.

It converts the plaintext into ciphertext. It converts the ciphertext into plaintext.

In encryption, the sender encrypts the data and then sends to the receiver.                                              In decryption, the receiver receives the data (ciphertext) and then converts it into plaintext.

Encryption algorithms

There are many algorithms available for encryption and decryption. A few algorithms are symmetric, while others are asymmetric.

Some of the widely used encryption algorithms:

  1. Triple DES
  2. Twofish encryption algorithm
  3. Blowfish encryption algorithm
  4. Advanced Encryption Standard (AES)
  5. RC4
  6. DSA
  7. Diffie-Hellman
  8. RSA (Rivest-Shamir-Adleman) security

Cryptanalyst

A cryptanalyst is someone who analyzes and decrypts the encrypted data, even without having knowledge of the decryption key. The analysis of cryptosystem, ciphertext and ciphers is called cryptanalysis. Cryptanalysts decode and decipher messages for political, law enforcement and military agencies.

Encoding

Encoding was implemented in 1973 by scholar Stuart Hall. Encoding is the process of converting plaintext data from one form to another. In encoding, we use sequences of characters such as letters, numbers and other special characters into a specialized format for easier transmission.

The major purposes of developing encoding are data transmission, data storage and data compression/decompression. ASCII encoding is the most widely used encoding format. 

It has been commonly observed that the Base64 encoding algorithm is used for sending the data. Base64 is very trivial to break, thus making it simple for an attacker to get sensitive data from encoded data. As a good practice, no sensitive data should be sent using encoding.

Decoding

Decoding is the process of extracting the information from encoded data. As the name says, decoding is exactly the reverse process of encoding. Encoding and decoding are widely used in data transfer and for data storage. 

Encoding/decoding are altogether a different process and should not be confused with encryption/decryption. Major differences have been highlighted in the below section.

Differences between encoding and encryption

                    Encoding                        Encryption

It is the process of converting plaintext data from one form to another form. It is the process of converting plain text to encrypted (cipher) text.

As compared to encryption, encoding is the easier process. As compared to encoding, encryption is the more difficult process.

Encoding is easier to implement. Encryption is harder to implement.

Encoding is faster than encryption. Encryption is slower than encoding.

To decode the encoded data, no key is required. To decrypt the encrypted data, a secret key is required.

Anyone can decode the encoded data. Only authorized users (who have secret keys) can decrypt the encrypted data.

Encoding is used for maintaining the data usability. Encryption is used for maintaining data confidentiality.

 

Learn Applied Cryptography

Learn Applied Cryptography

Build your applied cryptography and cryptanalysis skills with 13 courses covering hashing, PKI, SSL/TLS, full disk encryption and more.

Conclusion

Encryption and encoding are both different processes and both have their own purpose in computer systems. If something sensitive needs to be sent over the network, encryption should be used; otherwise, encoding should be the go-to choice. Encryption deals with maintaining confidentiality and integrity of the data, while encoding mostly deals with data compression/decompression.

Sources

  1. Encoding vs Decoding, EDUCBA
  2. Difference between Encryption and Decryption, GeeksforGeeks
  3. Encryption, TechTarget
  4. Hashing vs. Encryption vs. Encoding vs. Obfuscation, Daniel Miessler
  5. Top 8 Strongest Data Encryption Algorithms in Cryptography, Acodez
Nitesh Malviya
Nitesh Malviya

Nitesh Malviya is a Security Consultant. He has prior experience in Web Appsec, Mobile Appsec and VAPT. At present he works on IoT, Radio and Cloud Security and open to explore various domains of CyberSecurity. He can be reached on his personal blog - https://nitmalviya03.wordpress.com/ and Linkedin - https://www.linkedin.com/in/nitmalviya03/.