150 likes | 175 Views
Explore the process of encoding and decoding messages using ciphers to maintain privacy, along with coding theory, Hamming distance, and group codes for error detection and correction.
E N D
CHAPTER 2-PART IV CRYPTOGRAPHY BY FARAH ADIBAH ADNAN
Introduction • Process of writing (encoding & decoding) using various methods to keep message secret / hide information. • Encoding - process of putting a sequence of characters (letters, numbers, punctuation, and certain symbols) into a specialized format for efficient transmission or storage. • Decoding - opposite process (the conversion of an encoded format back into the original sequence of characters). • Codes – called ciphers. • This is important to maintain the privacy of information transmitted over public lines of communication – ATM cards, passwords.
Coding Theory The basic unit information: • Message – finite sequence of characters • Words – sequence of 0’s or 1’s Weight • For , the number of 1’s in is called weight of x. • Denoted by . • Eg:
1. Parity Check Code • Encoding function: • Add digit 0 or 1 to the last binary words. • Called parity (m,m+1) check code. • If where,
Example: Construct a word code using the parity check code. • b=1101 • b=11101
2. Hamming Distance • Suppose . • The Hamming distance, is the weight difference/distance between x and y, where the number of positions in which x and y is differ. • Denoted: Since there is 2 difference, Hamming distance = 2
Example: Find the Hamming difference of the following: • . • .
3. The Minimum Distance • Encoding function: • The minimum distance between all distinct pairs of code words. Theorem: An (m,n) encoding function can detect errors (k), if and only if
Example: • Find the minimum distance for the following code words: • How many errors will detect?
Group Codes • An (m,n) encoding function is called a group code if is a subgroup of . Subgroup: • . • . • .
Example: Determine whether the following encoding functions forms a group code:
Decoding & Error Correction • Decoding function (d) must be onto, so that every received word can be decoded to give a word in . Encoding function (m,n) : Decoding function (n,m): • Technique used – Maximum Likelihood. • Determine all left cosets of N. • Find a cosets leader (word of least weight). *num of leader cosets = • If the word (x) is received, determine the coset of N to which x belongs. • Let α be a coset leader. Compute .
Example: Given with encoding function Decode 1110 and 0001.
Solution Step 1: Let N={0000, 1011, 0100, 1111} Step 2: The number of coset leader: *Mainly coset leader used: 0000, 0001, 0010. 1000. Step 3:
Solution Step 4: Thus,