140 likes | 268 Views
Internet Engineering Czesław Smutnicki Discrete Mathematics – Numbers Theory. 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.
E N D
Internet Engineering Czesław Smutnicki DiscreteMathematics– NumbersTheory
CONTENTS • Basic notions • Greatest common divisor • Modular arithmetics • Euclidean algorithm • Modular equations • Chinese theorem • Modular powers • Prime numbers • RSA algorithm • Decomposition into factors
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 • Composite 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}
GREATEST COMMON DIVISOR • Common divisor: if d|a and d|b • d|(ax + by) • Relatively prime numbers a and b : gcd(a,b)=1
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)
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 P Decryption C
Thank you for your attention DISCRETE MATHEMATICS Czesław Smutnicki