# Data Encryption - Internet Technologies

## What isData Encryption?

Encryption is a method of providing security to the information by encoding in such a way that only authorized user only can read it. It creates cipher text using encryption algorithm that is read only by decrypting it.

### Types of Encryption

Below are the two types of encryption schemes.

• Symmetric Key encryption

• Public Key encryption

### SYMMETRIC KEY ENCRYPTION

Same cryptographic keys are used for both encryption and decryption of cipher text.

### PUBLIC KEY ENCRYPTION

A pair of keys is used in Public key encryption, where one is a secret key and other is made public. There is a mathematical relation between two keys.

### Hashing

Hashing is a method to encrypt data and generate hash values which are unpredictable. Hash code is generated which helps to protect the security of transmission from unauthorized users.

### Hash function algorithms

It is the way that the message received is verified with the actual message sent. A plain text message is taken as input and computes a value based on that message.

Key Points

• Computed value length is much shorter than the original message.

• There is a possibility that different plain text messages could generate the same value.

Let us discuss an example of a sample hashing algorithm where we multiply the number of a’s, e’s and h’s in the message and will then add the number of o’s to this value.

For example, the message is “ the combination to the safe is two, seven, thirty-five”. The hash of this message, using our simple hashing algorithm is as follows:

2 x 6 x 3 ) + 4 = 40

John receives the hash of this message with cipher text. After decrypting the message, he then computes the hash value using the same hashing algorithm. If the hash value sent by Bob is not matching the hash value of the decrypted message, then John will know that the message is modified.

For example, John received a hash value of 17 and decrypted a message Bob has sent as “You are being followed, use backroads, hurry”

The message has been altered because the hash value of the message he received is:

(3x4x1)+4 = 16

This is different from then value 17 that Bob sent.