Presentation is loading. Please wait.

Presentation is loading. Please wait.

Internet Engineering Czesław Smutnicki Discrete Mathematics – Numbers Theory.

Similar presentations


Presentation on theme: "Internet Engineering Czesław Smutnicki Discrete Mathematics – Numbers Theory."— Presentation transcript:

1 Internet Engineering Czesław Smutnicki Discrete Mathematics – Numbers Theory

2 CONTENT S Basic notions Greatest common divisor Modular arithmetics Euclide an algorithm Modular equations Chinese theorem Modular powers Prime numbers RSA algorithm Decomposition into factors

3 BASIC NOTIONS Natural/integer numbers Divisor d|a, a = kd for some integer k d|a if and only if -d|a Divisor: 24: 1,2,3,4,6,8,12,24 Trivial divisors 1 and a Prime number 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59 Compos ite number, 27 (3|27) For any integer a and any positive integer n there exist unique integers q and r, 0<=r<n so that a = qn + r Residue r = a mod n Division q = [a/n] Congruence: a  b (mod n) if (a mod n) = (b mod n) Equivalence class (mod n): [a] n = {a + kn : k  Z}

4 GREATEST COMMON DIVISOR Common divisor: if d|a and d|b d|(ax + by) Relatively prime numbers a and b : gcd(a,b)=1

5 MODULAR ARITHMETIC +012345 0012345 1123450 2234501 3345012 4450123 5501234

6 EUCLIDE AN ALGORITHM

7 EUCLIDE AN ALGORITHM. INSTANCE

8 EUCLIDE AN ALGORITHM. INSTANCE cont.

9 MODULAR EQUATIONS EQUATION EITHER HAS d VARIOUS SOLUTIONS mod n OR DOES NOT HAVE ANY SOLUTION CASE b = 1: MULTIPLICATIVE INVERSE (IF gcd(a,n)=1 THEN IT EXISTS AND IS UNIQUE)

10 LEAST COMMON MULTIPLIER

11 CHINESE THEOREM

12 MODULAR POWERS

13 RSA ALGORITHM Find two big prime numbers p and q Calculate n=p*q and z=(p-1)*(q-1) Find any number d relatively prime with z Find number e so that (e*d) mod z=1 Public key (e,n) Private key (d,n) Encryption message PDecryption C

14 Thank you for your attention DISCRETE MATHEMATICS Czesław Smutnicki


Download ppt "Internet Engineering Czesław Smutnicki Discrete Mathematics – Numbers Theory."

Similar presentations


Ads by Google