Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Obfuscation, Hashing, and Encryption?

What is the difference between Obfuscation, Hashing, and Encryption?

Here is my understanding:

  • Hashing is a one-way algorithm; cannot be reversed
  • Obfuscation is similar to encryption but doesn't require any "secret" to understand (ROT13 is one example)
  • Encryption is reversible but a "secret" is required to do so
like image 353
Robert Taylor Avatar asked Oct 08 '08 19:10

Robert Taylor


People also ask

What is the difference between encryption and hashing?

Since encryption is two-way, the data can be decrypted so it is readable again. Hashing, on the other hand, is one-way, meaning the plaintext is scrambled into a unique digest, through the use of a salt, that cannot be decrypted.

What is the difference between data obfuscation and data encryption?

Encryption is used to protect sensitive data, such as payment card information (PCI), personally identifiable information (PII), financial account numbers, and more. Data masking, also called data obfuscation, is a data security technique to hide original data using modified content.

Is hashing considered obfuscation?

Obfuscation is hiding or making something harder to understand. Hashing takes an input, runs it through a function, and generates an output that can be a reference to the input.

Is encryption a form of obfuscation?

Obfuscation is an umbrella term for a variety of processes that transform data into another form in order to protect sensitive information or personal data. Three of the most common techniques used to obfuscate data are encryption, tokenization, and data masking.


1 Answers

Hashing is a technique of creating semi-unique keys based on larger pieces of data. In a given hash you will eventually have "collisions" (e.g. two different pieces of data calculating to the same hash value) and when you do, you typically create a larger hash key size.

obfuscation generally involves trying to remove helpful clues (i.e. meaningful variable/function names), removing whitespace to make things hard to read, and generally doing things in convoluted ways to make following what's going on difficult. It provides no serious level of security like "true" encryption would.

Encryption can follow several models, one of which is the "secret" method, called private key encryption where both parties have a secret key. Public key encryption uses a shared one-way key to encrypt and a private recipient key to decrypt. With public key, only the recipient needs to have the secret.

like image 181
theraccoonbear Avatar answered Oct 12 '22 12:10

theraccoonbear