1 / 22

Elements of Coding and Encryption

Elements of Coding and Encryption. Encryption. In the modern word, it is crucial that the information is transmitted safely . For example, Internet purchases, bank and credit card electronic transactions must be secure, which means that no confidential information can be lost.

kele
Download Presentation

Elements of Coding and Encryption

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Elements of Coding and Encryption

  2. Encryption • In the modern word, it is crucial that the information is transmitted safely. • For example, Internet purchases, bank and credit card electronic transactions must be secure, which means that no confidential information can be lost. • To protect any information, encryption must be used.

  3. Error-Correcting Coding • In the modern world it is also crucial that ant information is transmitted correctly. • Using error-correcting coding we can encode any message with redundancy, so that even some part of the message is incorrectly transmitted, it still may be possible to reconstruct the original. • Example: • “DM” ~ “Discrete Math” • “Discrete Mathematics” ~ “Discrete Math” • Any error in the first code is fatal, while even multiple errors in the second code, which is redundant, can be easily corrected: “DiicrettMatemmttcs”

  4. Coding and Encryption: Mathematical Background • The most popular techniques of error-correcting coding and encryption are based on the specific operations defined on the set of integer numbers and on some specific properties of integer numbers, which are studied in detail in the Number Theory. • Here we will consider only some fundamentals, which will be needed for understanding of coding and encryption.

  5. Divisors • Let n, q and m be integers such that n = q ·m . • Then q and m are said to divide(or are factors) of n, while n is said to be a multipleof q and m.

  6. Divisor Theorem • Theorem: Let a, b, and c be integers. Then: • If a divides b anda divides c then a divides(b + c ) • Ifa divides b,thena divides bc for any c. • If a divides b,and b divides c, thena divides c.

  7. Division Algorithm • If m and n are integers and m≠0, the division algorithm states that n can be expressed in the form • q is called quotient and r is called reminder. • Take into account that the reminder must always be non-negative!

  8. Prime Numbers • A number n 2 is called a prime number if it is only divisible by 1 and itself. A number n 2 which isn’t prime is called composite.

  9. Modular Arithmetic: mod n • There are two types of “mod” operation (sometimes they could be confusing): • the mod nfunction • a mod n is the remainder of a/b. • Usually the domain of this function is Z+ ( a set of non-negative integers, however, it can also be Z), while its codomain is {0, 1, …, n-1}.

  10. Modular Arithmetic: Congruence • The congruence (mod m) • Relates two numbers x and y to each other relative some base m • x  y (mod m) means that x and y have the same remainder when dividing by m. • Let x, y be integers and mbe a positive integer. We say that xis congruent to ymodulo m: x y (mod m) if m divides (x – y).

  11. Congruence • Which of the following are true? • 3  3 (mod 17) • 4  -4 (mod 17) • 182  187 (mod 5) • -15  15 (mod 30)

  12. Congruence • Solutions: • 3  3 (mod 17) True. any number is congruent to itself (3-3 = 0, divisible by all) • 4  -4 (mod 17) False. (4-(-4)) = 8 isn’t divisible by 17. • 182  187 (mod 5) True. 182-187 = -5 is divisible by 5 • -15  15 (mod 30) True: -15-15 = -30 divisible by 30.

  13. Congruence • Theorem. x is congruent to y (mod m) when x=km+y for some integer k. • Corollary 1. x is congruent to the reminder in the division of x by m. • Corollary 2. x is congruent to y (mod m) if and only if x and y have the same reminder when divided by m.

  14. Congruence Classes • Congruencemod m establishes the equivalence relation on the set Z of integer numbers. • The equivalence classes for congruencemod m are called congruence classes (mod m). The set of all the congruence classes mod m is denoted Zm.

  15. Congruence Classes • Since any two equivalence classes are either equal or disjoint, then any two congruence classes mod m are either equal or disjoint. • Just to recall: [x] is the equivalence class determined by the element x. • In Zm , [x] = [y] if and only if x  y (mod m).

  16. Congruence Classes • If r is the reminder in the division of x by m, then [x] = [r] in Zm . • Hence, there are mdistinct congruence classes in Zm : [0], [1], …, [m-1] corresponding to the mpossible reminders when dividing by m.

  17. Congruence Classes • For example, there are 3 distinct equivalence classes in Z3 : [0]= {…, -6, -3, 0, 3, 6, …}; [1]= {…,-5, -2, 1, 4, 7, …}; [2]= {…,-4, -1, 2, 5, 8, …} • Each congruence class can be determined by its arbitrary representative. It is just more convenient, to avoid any confusion, to use “natural” notations [0], [1], …, [m-1] for the distinct congruence classes in Zm.

  18. Operations in Zm • Addition: [x]+[y]=[x+y] • Multiplication: [x][y]=[xy] • These definitions depend only on congruence classes themselves, but not on their particular representatives.

  19. Operations in Zm • Theorem. If x x’ (mod m) and y y’ (mod m), then • x + y  x’ + y’ (mod m) • xy  x’y’ (mod m) • Corollary. If x z (mod m) then and moreover,

  20. Operations in Zm • Examples of operations: • In Z8 : [5]+[3] = [5 + 3] = [8] = [0] since 80 (mod 8) • In Z8 : [5][3] = [5∙3]= [15] = [7] since 157 (mod 8) • In Z8 : [7]5 =[-1]5=[(-1)5]=[-1]=[7] since 7-1 (mod 8).

  21. Operations in Zm • Example. A power generator was fully fueled at 9-00 am. It uses 2 gallons/hour of fuel. The capacity of a tank is 60 gallons. When it will be necessary to fuel the generator again? • Let 0=12am, 1= 1am, …, 12=12pm, 13=1pm, …, 23 = 11pm. Then in Z24 : [9]+[60/2] = [9] + [30] = [9+30] = [39] = [15] since 3915 (mod 24). Since 15 corresponds to 3pm, this is the next time of fueling.

  22. Homework • Read pp. 99-104 (Section 3.1) • Problems (Exercises 3.1) 1-22.

More Related