Tuesday, July 9, 2013

(107) Facebook

(107) Facebook


THE DIFFERENCES BETWEEN ENCRYPTION, HASHING, AND ENCODING.

Introduction
I think that some of the most loosely used terms in the hacking community are those surrounding "Encryption". If you have been on certain "hacking" forums (ahem, HF), you would have seen (Many a time, if I might add) people asking for someone to "decrypt" their base64 code or their MD5 hash (Sometimes the question even follows the line of "Can someone decrypt this base64 hash"). Whenever I see this, a little piece of me dies inside. I'm here to put this aweful generalisation of these terms.

Encryption
Let's start out with the big one. Encryption does not mean hiding data so that just anybody can find out what the data was. What encryption actually is a way of hiding information so that only particular people can find out what the original data was. This is done by using keys that are not shared with the encrypted data. These keys are used to decrypt the encrypted data into their original form. Keys do not have to be complex. They can be as simple as a number (For example in a shift cipher, the key is how many characters each character is shifted by. However don't confused ROT13 as an encryption just because it shifts the characters. It is an encoding. I will explain why later). There are two commonly used (and simple) methods of encryption:
Symmetric Encryption
Symmetric Encryption is the simple one. It is where you use one single key to encrypt and decrypt the data.
Asymmetric Encryption
Asymmetric Encryption is slightly more complex. It deals with the problem of sharing keys across a network. It involves two keys. A public key and a private key. The Public Key is, as the name suggests, public. The Private Key is kept for yourself. Messages that are encrypted with the public key are decrypted with the matching private key and vice versa with encryption using the private key.

Hashing
Hashing creates a fixed-length code from inputs. Unlike Encryption, there are no keys required. MD5 is an example of a hash function. I assume most people confuse it with an encryption either out of pure lack of intellect, or because of this abomination. With hashing, even a small change to the input string can result in a large change to the output hash. As well as this, hashing is one way. There is no way to make the output become the input.

Encoding
Encoding is NOTHING like encryption. The only difference they have is that the output is different to the input. Encoding data is not about trying to hide the data to make sure that someone doesn't discover what it means. Encoding methods are public and easy to reverse because it's not about making it difficult to read. It's often just used for compatibility.
Like · · · about an hour ago ·

No comments:

Post a Comment