Table of Content • Introduction • Text Encryption Techniques • Data Encoding Techniques
Data/Text Encryption • The primary objective of data encryption is to transform the data in order to conceal the information during network transmission (internet, intranet).
Special Terms in Encryption • 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 keydefines the operation or the method of the encipherment algorithm. • Different keysproduce different ciphertext from a fixed plaintext.
Key K Encryption Plaintext X Ciphertext Y Text Encryption • Encryption is a process whereby plaintext is converted into enciphered text or ciphertext.
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.
Key K Decryption Ciphertext Y Plaintext X Text Decryption • Decryption or decipherment is the reverse process of encryption or encipherment, which is to convert ciphertext back to its original form of plaintext.
Text Decryption • 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 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.
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
Fixed Displacement Substitution • Example : • Plaintext : ABCDEFGHIJKLMNOPQRSTUVWXYZ • Key : BCDEFGHIJKLMNOPQRSTUVWXYZA This encrypts “multimedia”(plaintext) into “nvmujnfejb” (ciphertext)
Keyword Based Substitution • Simplest type of keyword based substitution is implemented in three steps : • A word or phrase is selected as keyword and use for forming the letters of the ciphertext alphabet • Repeated letters are omitted after their first occurrence • At the end of the word or phrase, remaining letters of the alphabet are used in the normal sequence
Keyword Based Substitution • 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 • Example: • Plaintext : ABCDEFGHIJKLMNOPQRSTUVWXYZ • Key : MULTIEDANVRSYBCFGHJKOPQWXZ This encrypts “Hello”(plaintext) to “Aissc”(ciphertext)
Columns • 1 2 3 4 5 6 7 • A B C D E F G • H I J K L M N • O P Q R S T U • V W X Y Z Rows 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:
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.
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
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
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”.
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.
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%.
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.
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
0 1 14 21 0 0 1 1 9 12 7 7 0 1 6 6 0 1 2 4 Huffman Encoding 7 00 7 01 9 10 6 111 2 1100 4 1101
Summary 1. 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.
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