Encryption Vs. Encode – The difference

In this article I will be explaining the difference between “encrypting a message” and “encoding a message”. “Encryption and encoding are two different words with different meanings”.

Let me get straight into the point, the reason behind writing this article is, that, there is a common miss-conception among some programmer/s that "encryption" and "encoding" are the same.

I have seen some of the articles posted within various dot-net communities even in DNS, posted by experienced members, where they treat encryption and encoding the same, as if they are synonym of each other.

For example:
Some of resource writers will post their resource title as "Encrypt and Decrypt a password" or "Simple encryption and decryption", and the content of the resource will be encoding, more specifically, base64 encoding, with an end message as, this is a simple encryption technique - A very wrong/miss-leading statement.
Basee64 encoding is not encryption, any encoding is not encryption.

One of them even re-defined the definition of encoding stating that, "encoding is a form of encryption"!!!

"Encoding is a form of encryption", is totally wrong statement, which miss leads the reader/s reading the resources posted.
The correct statement will be, "encoding can be one of the many process involved, in encryption process". This statement says that one can use encoding, although not always necessary, while encrypting a context.

Just because the three letters "enc", are same in both the words,'enc'ryption and 'enc'oding, does not means that they are the same. They are totally different from each other.

Encoding is a process of converting data or information into a specified or standard format where as encryption is a process of converting data or information in such a way that it's un-readable (without the password(s) and/or key(s)).

In order to understand the difference between encryption and encoding, we have to understand the meaning of both encryption and encoding individually.

So let's begin.

What is encoding?

By definition, encoding is a process of converting data or information into a specified or standard format. What does this definition states?

First let's go to the term format.
There are a lot of encoding formats, some of them that we know are: ASCII, BASE64, BASE32, BASE16 or better known as hexadecimal, UTF7, UTF8, UTF16, etc...

Let me give an ancient example:


The above picture stands for “SPIDER”. Let me assure you the above is a form of encoding and not encryption, although it may look like one.

Remember the definition of encoding, “converting data or information into a specified or standard format”. The specified format over here is an ancient way of encoding known as Freemason’s script.

So how did the above picture have decoded into the word “SPIDER”?
The symbols here are just the substitution of characters in English alphabets.
And are encoded as following:

Masonic table

And the representation or substitution:
m ref

You see here if you are aware of the table you can decode the symbols easily, and also encode the characters into symbols easily, which does not holds true for encryption,
because even if you know the table or the encryption algorithm, you cannot decrypt the encrypted context without a password or key (I will be covering that later).

Let me give another example:
A common miss-understanding among some programmers is that BASE64 encoding is encryption, which is not true at all.

Let me ask, would you consider converting a text message into its ASCII equivalent as encryption?
The answer will be “no”.

The same holds for BASE64. As ASCII is a format, BASE64 is another format, and no where related to encrypting a message.
One may argue that when we convert a simple text into BASE64 the resultant output is gibberish, and hence we can term it as encryption.

But let me remind you, as I have mentioned earlier that, in encryption even if you know the algorithm or encryption process, you cannot decrypt the encrypted message without a password.

But in case of encoding if you know the encoding process you can decode it easily, because it’s merely a text conversion, as I have shown in the example above.

So let’s come again to BASE64 encoding and how it works.

Let’s take the word “Microsoft”.
The first step would be to convert the simple text into “Extended ASCII”.

The Extended ASCII table for 0-127 character set:
ascii chart

So referring to the above table the word Microsoft’s ASCII equivalent will be:
M : 77, i : 105, c : 99, r : 114, o : 111, s : 115, o : 111, f : 102 and t : 116.

Now convert the ASCII equivalent into 8-bits binary format:

01001101, 01101001, 01100011, 01110010, 01101111, 01110011, 01101111, 01100110, 01110100.

Now concatenate the whole binary sequence:


Now divide the whole binary sequence into a pack of 6-bits starting from left:

010011, 010110, 100101, 100011, 011100, 100110, 111101, 110011, 011011, 110110, 011001, 110100.

Now convert each of the binary sequence into their decimal equivalent form.

010011 : 19
010110 : 22
100101 : 37
100011 : 35
011100 : 28
100110 : 38
111101 : 61
110011 : 51
011011 : 27
110110 : 54
011001 : 25
110100 : 52

Now there is a BASE64 index table:
base64 index

Now substitute the values that we derived with the values in the above chart:

19 : T
22 : W
37 : l
35 : j
28 : c
38 : m
61 : 9
51 : z
27 : b
54 : 2
25 : Z
52 : 0

So the BASE64 equivalent of “Microsoft” is “TWljcm9zb2Z0”.

So this is how you encode simple text into BASE64 characters, and as now we know the process we can decode BASE64 text into simple text too easily.

This is where encoding differs from encryption; once you know the encoding process you can decode it. But Not in case of encryption.

What is encryption?

Let’s take the example that we discussed earlier:
example encrypted

So what do we get if we decode it by referring the table that was mentioned earlier?
m ref

The result comes as “PCIFRARJT”. I do not think that there is a word called “PCIFRARJT” in English dictionary.

So was my encoded message wrong?
The answer is “no”.
My message is encrypted and then it’s encoded, and one can only read it if they know the password and the encryption process and necessarily they will have to decode it after wards.

So let’s decrypt the message:
The password that I have used here is “SPIDER” and I have converted the free- mason table as such:
masonic table encrypted

And the representation or substitution:
mref 2

So, let’s verify the encrypted message with the above table:
example encrypted

The word comes out to be: “MICROSOFT”.

So it should be difficult do decrypt an encrypted message if you do not have the password or the key, even if you know the encryption process.
Take the case of above example if you change the password again, the entire table changes, try it out.

So once again "encoding" and "encryption" are different, both in context and use, and should not be confused as being same.

***********************The End************************************

Reference: http://www.blesta.com/2009/07/26/encoding-vs-encryption/


No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: