CIP Cyber

Understand Encryption, Hashing, Encoding, and Obfuscation

Table of Contents

You are mistaken if you believe Encryption, Hashing, Encoding, and Obfuscation are similar terms! Despite their apparent similarity, they are all opposed. This article discusses the structure and difference between hashing, encryption, encoding, and obfuscation. But first, let’s discuss some security terms.

Confidentiality refers to preventing unauthorized entities from accessing data and ensuring that actual users have exposure to restricted information.

Integrity refers to the ability to prevent data tampering.

Authentication is concerned with determining who owns the data.

Let’s start defining!

What is Encryption, and How does it Work?

Encryption is the method of converting information that ensures confidentiality. Data encryption carries out using cryptographic keys. Before transmitting, the data is encrypted, and the recipient decrypts it. As a result, when information transfers, it is secure.

What is Encryption, and How does it Work? Encryption, Hashing, Encoding, and Obfuscation

Encryption is of two types: symmetric and asymmetric.

  • In symmetric encryption, a single key uses to both encrypt and decrypt data. Anybody who is permitted to view the information must have access to the single secret key.
  • Asymmetric encryption employs two keys: one private and one public. The private key is confidential, while anyone can utilize the public key.

The Public Key is almost everywhere. And if you aren’t aware of it, you even have it. Every time you access an HTTPS-enabled site, one key is in your web browser. AES, Blowfish, RSA are some algorithms uses for data encryption.

Encryption Usage

  • Store confidential info should be obtained, such as credit card information.
  • Full disc encryption, for example, can protect data inside storage devices in the case of theft.

Encryption Example

Alice tries to send a text to Bob, even though Julia is looking in and retrieving their conversations. So, how are Alice and Bob going to interact without Julia listening to them? Alice and Bob plan to encrypt their data using secret keys. Alice and Bob have two pairs of keys: one public key that anyone can use and one private key that they should always hide.

Only a private key can decrypt data encrypted with a public key and vice versa. Alice encrypts her message with Bob’s public key, and only Bob’s private key can decipher it. Bob gets and opens it with the private key, but how can Bob be confident that Alice sent it. Then, Alice would encrypt the message with Bob’s public key and her private key. To read the message and check that it is truly from Alice, Bob should first utilize Alice’s public key, next to his private key. On the other hand, Julia is unable to read the message as she doesn’t have access to anyone’s hidden keys.

What is Hashing, and How does it Work?

Let’s say it was someone’s celebration, and you want to wish them. Your friend tries to make a joke by intercepting and changing your greeting to something awful. Assume the repercussions.

Hashing ensures the integrity of information. It safeguards information from tampering and ensures that it doesn’t alter in any way. A hash is a fixed-length number generated using a hash function.

Uniqueness is one of Hashing’s most crucial attributes. The hash function works in a manner that no two hashes for two distinct messages are identical. And it’s nearly rare to get back to the actual message from the hash value.

What is Hashing, and How does it Work? Encryption, Hashing, Encoding, and Obfuscation

Hashing is combined with authentication to provide clear proof that a text does not tamper. This achieves through hash the input and verifies it with the sender’s private key. When the receiver receives the text, they will verify the signature of the hash using the sender’s public key, then hash the text itself and match it to the sender’s hash. If they match, it confirms the authentication of the authentic user. sha-3, md5 are some algorithms uses for hashing.

Hashing Usage

  • Password storage
  • Data checksums
  • A component in broader algorithms

Hashing Example

Use any MD5 hash generator and try converting the same sentence with minor changes.

Text: Hello World

Hash: b10a8db164e0754105b7a99be72e3fe5

Now Change the text a bit.

Text: Hello Worlds

Hash: 9f0d0cd67d27414d0ae8f5eca41a1a36

Notice how adding the ‘s’ in Worlds completely changed the hash value? And that is what hashing accomplishes.

What is Encoding?

The method of translating information from one type to another is known as encoding. It has nothing to do with the CIA triad. Since there is no mystery involved, and it is reversible. Encoding techniques are open to the public that uses to handle information. The information decodes using the same algorithm that uses to encrypt it. Ascii, unicode, URL Encoding, base64 are some algorithms uses for encoding.

Encoding Usage

  • Adjust information to a given set of characters, for example, to facilitate network transmission or to convert binary data to a text-based structure.

Encoding Example

Information transmitted over a network follows a particular layout, and URL-encoding the information enables it to do so.

  • The information must be HTML encoded to comply with the proper HTML character format.
  • Base64 encoding is a popular method for encoding binary data. It is processed or transmitted to handle text information.

What is Obfuscation?

Obfuscation, like encoding, does not offer any security properties even though it is often incorrectly seen as an encryption tool. Obfuscation is the process of converting a human-readable text into a text that is hard to comprehend.

Obfuscation of source code is a trendy use since it makes reverse engineering of a product more difficult. It can also be reversed, much like encoding, utilizing the similar strategy that obscured it.

Obfusacaton Usage

  • Lift the stakes when dealing with unproductive opponents.
  • Data compression.

Examples: javascript obfuscator, proguard.

Hashing vs Encryption vs Obfuscation vs Encoding – Video Guide

 

Summary

  • Encryption keeps data private and involves the usage of a secret key to decrypt it.
  • Hashing validates the integrity of information by identifying any modifications to the visible hash output.
  • Encoding keeps information usable and restores information using a similar algorithm used to encrypt the text.
  • Obfuscation is a technique for making anything challenging to comprehend. It is frequently used with computer programs to avoid reverse engineering or theft of an item’s features.
SanaQazi

SanaQazi

Most popular

Industrial Cybersecurity

Want always be up to date?

Don't miss the latest news

By subscribing to our mailing list, you will be enrolled to receive our new trainings, latest blog posts, product news, and more.

CIP Training & Certifications

Transform your cybersecurity skills with CIP Cyber’s comprehensive training & course offerings

Related Articles

Want always be up to date?

Don't miss the latest news

By subscribing to our mailing list, you will be enrolled to receive our new trainings, latest blog posts, product news, and more.

CIP Training & Certifications

Transform your cybersecurity skills with CIP Cyber’s comprehensive training & course offerings