Encryption concept

Encryption is a process of hide original information. Only an authorized person can read the hidden information. Used for protecting information sent from one point to another especially over network.

Plain-text is not encrypted information or the original text. Encryption key is a secret value applied to plain-text to encrypt information. Cipher-text is the result of encryption process or encrypted information. Same encryption key needed to reverse this process to get original text. The reverse process is called decryption.

Example


Let say we want to encrypt following message "hello world". Assuming that we have a table that assign a decimal value for each characters, such as a = 1 , b=2 etc. and continues to capital letters. The table also has special characters like space which equal 0. (Please refer to ASCII table for actual representation of characters).

By comparing our message and character integer table, the message is represented by following sequence of integer value as shown in the table:

h
e
l
l
o
w
o
r
l
d
8
5
12
12
15
0
23
15
18
12
4


Encryption key can be any value, for this example we choose 5 as it value. We encrypt the message by add 5 to the respective integer values for each characters in the message. As a result we will get the following table.

m
j
q
q
t
e
B
t
w
q
i
13
10
17
17
20
5
28
20
23
17
9


If someone reads the encrypted text they will read "mjqqteBtwqi" which make no sense for untrained eye. A hacker could see the pattern and knows how to figure out the encryption key.

To read the original message we need to decrypt the secret message. We just need to do the opposite, we minus 5 to each respective integers that represent letters in our cipher text which will give us the first table.

This is a very simple encryption example and prone to hack. This should not be used for actual implementation.

Comments

Popular posts from this blog

Drawing Simple Pie Chart

VB.net connecting to SQL Server

VB.net