Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data...

28
Encryption and Encoding

Transcript of Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data...

Page 1: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Encryption and Encoding

Page 2: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Table of Content

1. Introduction2. Text Encryption Techniques3. Data Encoding Techniques

Page 3: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

• The primary objective of data encryption is to transform the data in order to conceal the information during network transmission (internet, intranet).

Data/Text Encryption

Page 4: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

• The original unaltered contents of the message or text is called plaintext.

• Encipherment or encryption is a process whereby plaintext is converted into enciphered text or ciphertext.

• The enciphering process is an algorithm that operated on the plaintext based on the value of a key. The key defines the operation or the method of the encipherment algorithm.

• Different keys produce different ciphertext from a fixed plaintext.

Special Terms in Encryption

Page 5: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

• Encryption is a process whereby plaintext is converted into enciphered text or ciphertext.

EncryptionPlaintext X Ciphertext Y

Key K

Text Encryption

Page 6: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Text Encryption

• Different types of key represent different types of text encryption techniques.

• There are different techniques with various security levels in text encryption, depending on the level of confidentiality of the data.

Page 7: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

• Decryption or decipherment is the reverse process of encryption or encipherment, which is to convert ciphertext back to its original form of plaintext.

DecryptionCiphertext Y Plaintext X

Key K

Text Decryption

Page 8: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

• Decryption process needs to use the same key that is used in the encryption process to obtain the original plaintext.

• Although one may obtain a copy of the encrypted message, one must use the correct key to successfully decrypt the message.

Text Decryption

Page 9: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Text Encryption Technique

• A common encryption technique is known as substitution method

• Substitution method can be divided into 3 forms: • fixed displacement substitution • keyword based substitution• matrix based substitution.

Page 10: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Fixed Displacement Substitution

• Ciphertext represent a fixed displacement in the alphabet.

• The relationship between the mapping of plaintext and ciphertext characters are as below: • Plaintext : ABCDEFGHIJKLMNOPQRSTUVWXYZ• Key : BCDEFGHIJKLMNOPQRSTUVWXYZA

Page 11: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Fixed Displacement Substitution

• Example :

• Plaintext : ABCDEFGHIJKLMNOPQRSTUVWXYZ• Key : BCDEFGHIJKLMNOPQRSTUVWXYZA

This encrypts “multimedia”(plaintext) into“nvmujnfejb” (ciphertext)

Page 12: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Fixed Displacement Substitution

Page 13: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Keyword Based Substitution

• Simplest type of keyword based substitution is implemented in three steps :

1. A word or phrase is selected as keyword and use for forming the letters of the ciphertext alphabet

2. Repeated letters are omitted after their first occurrence

3. At the end of the word or phrase, remaining letters of the alphabet are used in the normal sequence

Page 14: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

• For example, suppose we use the phrase “MULTIMEDIA UNIVERSITY”. We then form one word and remove the duplicated letters to get a newly formed word “MULTIEDANVRSY”.

• The remaining alphabet letters are then added at the end of the keyword to give you the keyword-based mixed alphabet “MULTIEDANVRSYBCFGHJKOPQWXZ” (key)

Keyword Based Substitution

Page 15: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Keyword Based Substitution

• Example:

• Plaintext : ABCDEFGHIJKLMNOPQRSTUVWXYZ• Key : MULTIEDANVRSYBCFGHJKOPQWXZ

This encrypts “Hello”(plaintext) to “Aissc”(ciphertext)

Page 16: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Matrix Based Substitution

• By placing an alphabet into an n x n matrix or array, one can obtain the ability to design the ciphertext alphabet in many different ways

• For example, consider the matrix below:

1 2 3 4 5 6 7

1 A B C D E F G

2 H I J K L M N

3 O P Q R S T U

4 V W X Y Z

Columns

Rows

Page 17: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Matrix Based Substitution

• By extracting the matrix element in a predefined sequence, you can develop a transpose alphabet.

• If you extract the matrix elements in each column, commencing with column 7 working backward, extracting the elements in column 6, 5 and so on, the alphabet GNUFMTELSZDKRYCJQXBIPWAHOV (key) is created.

• If matrix elements are extracted in a progressive column order, alphabet AHOVBIPWCJQXDKRYELSZFMTGNU (key) is created.

Page 18: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Data encoding techniques

• Data encoding techniques can be classified into two broad types:-• Repetition Encoding/Suppression

• Zero or Blank Encoding• Run-length Encoding

• Statistical Encoding• Pattern Substitution• Diatomic Encoding• Huffman Encoding

Page 19: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Statistical Encoding• In this technique, patterns of bits (word) or that

are more frequent are recorded using shorter codes.

• This method may have 3 forms• Pattern Substitution• Diatomic Encoding• Huffman Encoding

Page 20: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Pattern Substitution• In pattern substitution technique, frequent

patterns or characters, or frequent words, are replaced by a shorter sequence.

• For example, lecture notes for this course can be encoded using pattern substitution by replacing all the occurrences of the word “Multimedia” with the character “*M”.

Page 21: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Pattern Substitution

Networked Multimedia Systems is an exemplary example of a book on multimedia and networking. Nowhere else will you find this kind of coverage and completeness. This is truly a one-stop-shop for all that you want to know about multimedia and network.

Page 22: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Pattern Substitution

a about all an and for is of on

1 2 3 4 5 6 7 8 9

that this to will multimedia networking

+ & = # m* n*

Page 23: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Diatomic Encoding• This encoding is based on a combination of two

data bytes which are frequently occurring.

• According to the analysis of English language, the most frequent occurring pairs are the following : “E_”, “T_”, “TH”, “_A”, “S_”, “RE”, “IN” and “HE”.

• Replacement of these pairs by special single byte that do not occur anywhere else in the text gives a data reduction of more than 10%.

Page 24: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Huffman Encoding• Different characters need not be encoded with

the same number of bits.

• With the help of the knowledge of frequency occurrence of characters, the Huffman encoding algorithm provides the more frequent characters with the code having lesser number of bits.

Page 25: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Huffman Encoding• Eg:

• Consider weights 2, 4, 6, 7, 7, 9.• First the algorithms repeatedly combines the smallest two

weights to obtain shorter and shorter weight sequences.

• 2, 4, 6, 7, 7, 9 replaces 2 and 4 by 2 + 4 and calls for• 6, 6, 7, 7, 9 which replaces 6 and 6 by 12 and calls for• 7, 7, 9, 12 which calls for• 9, 12, 14 which calls for • 14, 21

Page 26: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Huffman Encoding

14 21

9 127 7

66

2 4

0 1

0 0

0

0

1 1

1

1

7 007 019 106 1112 11004 1101

Page 27: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Summary1. The primary objective of data encryption is to transform the data

in order to conceal the information during network transmission (internet, intranet).

2. The original unaltered contents of the message or text is called plaintext.

3. Encipherment or encryption is a process whereby plaintext is converted into enciphered text or ciphertext.

4. The enciphering process is an algorithm that operated on the plaintext based on the value of a key.

5. Decryption or decipherment is the reverse process of encryption or encipherment, which is to convert ciphertext back to its original form of plaintext.

Page 28: Encryption and Encoding. Table of Content 1.Introduction 2.Text Encryption Techniques 3.Data Encoding Techniques.

Summary

6. Text Encryption Techniques:• fixed displacement substitution • keyword based substitution• matrix based substitution

7. Data encoding techniques:- Statistical Encoding• Pattern Substitution• Diatomic Encoding• Huffman Encoding