The Euclidean Algorithm That’s right, it’s real..

Slides:



Advertisements
Similar presentations
Division & Divisibility. a divides b if a is not zero there is a m such that a.m = b a is a factor of b b is a multiple of a a|b Division.
Advertisements

Number Theory Algorithms and Cryptography Algorithms Prepared by John Reif, Ph.D. Analysis of Algorithms.
1 Lect. 12: Number Theory. Contents Prime and Relative Prime Numbers Modular Arithmetic Fermat’s and Euler’s Theorem Extended Euclid’s Algorithm.
COMP 170 L2 Page 1 L06: The RSA Algorithm l Objective: n Present the RSA Cryptosystem n Prove its correctness n Discuss related issues.
Section 4.1: Primes, Factorization, and the Euclidean Algorithm Practice HW (not to hand in) From Barr Text p. 160 # 6, 7, 8, 11, 12, 13.
22C:19 Discrete Structures Integers and Modular Arithmetic
BY : Darshana Chaturvedi.  INTRODUCTION  RSA ALGORITHM  EXAMPLES  RSA IS EFFECTIVE  FERMAT’S LITTLE THEOREM  EUCLID’S ALGORITHM  REFERENCES.
Quotient-Remainder Theory, Div and Mod
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Quotients as Equations Domain 2, Lesson 8 Quotients as Equations Mr. Heath Blue Creek Elementary School.
CSC2110 Discrete Mathematics Tutorial 5 GCD and Modular Arithmetic
RSA ( Rivest, Shamir, Adleman) Public Key Cryptosystem
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Tuesday, 26 November Number-Theoretic Algorithms Chapter 31.
Chapter II. THE INTEGERS
6/20/2015 5:05 AMNumerical Algorithms1 x x1x
Chapter 4 – Finite Fields Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic Curve, IDEA, Public.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 7 Tuesday, 11/6/01 Number-Theoretic Algorithms Chapter.
Codes, Ciphers, and Cryptography-RSA Encryption
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
Peter Lam Discrete Math CS.  Sometimes Referred to Clock Arithmetic  Remainder is Used as Part of Value ◦ i.e Clocks  24 Hours in a Day However, Time.
BY MISS FARAH ADIBAH ADNAN IMK
1 Properties of Integers Objectives At the end of this unit, students should be able to: State the division algorithm Apply the division algorithm Find.
9/2/2015Discrete Structures1 Let us get into… Number Theory.
Introduction to Modular Arithmetic and Public Key Cryptography.
Mathematics of Cryptography Part I: Modular Arithmetic
February 24, 2015Applied Discrete Mathematics Week 4: Number Theory 1 Modular Arithmetic Let a be an integer and m be a positive integer. We denote by.
COMP 170 L2 Page 1 L05: Inverses and GCDs l Objective: n When does have an inverse? n How to compute the inverse? n Need: Greatest common dividers (GCDs)
MATH 224 – Discrete Mathematics
Module :MA3036NI Cryptography and Number Theory Lecture Week 7
1 Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown Chapter 4 – Finite Fields.
Information Security and Management 4. Finite Fields 8
Section 4.3: Fermat’s Little Theorem Practice HW (not to hand in) From Barr Text p. 284 # 1, 2.
Extended Euclidean Algorithm Presented by Lidia Abrams Anne Cheng.
Prelude to Public-Key Cryptography Rocky K. C. Chang, February
WIKIPEDIA HAS MANY MORE DIVISIBILITY RULES. EXAMPLE Since 52=13(4) is divisible by 4, is divisible by 4 Since 452=56(8)+4 is not divisible.
Cryptography Inverses and GCD Piotr Faliszewski. GCD(a,b) gcd(a, 0) = a gcd(a, b) = gcd(b, a mod b) a = b*q + r Here: q =  a / b  r = a mod b (a –
Introduction to Cryptography
Elements of Coding and Encryption Continuation 1.
RSA Prepared by: SITI ZAINAH ADNAN
The RSA Algorithm. Content Review of Encryption RSA An RSA example.
YSLInformation Security -- Public-Key Cryptography1 Prime and Relatively Prime Numbers Divisors: We say that b  0 divides a if a = mb for some m, where.
MAT 320 Spring 2008 Section 1.2.  Start with two integers for which you want to find the GCD. Apply the division algorithm, dividing the smaller number.
Section 2.2: Affine Ciphers; More Modular Arithmetic Shift ciphers use an additive key. To increase security, we can add a multiplicative parameter. –For.
22C:19 Discrete Structures Integers and Modular Arithmetic Fall 2014 Sukumar Ghosh.
Lecture 6.1: Misc. Topics: Number Theory CS 250, Discrete Structures, Fall 2011 Nitesh Saxena.
Euclidean Algorithm How to find a greatest common divisor in several easy steps.
1 Section Congruences In short, a congruence relation is an equivalence relation on the carrier of an algebra such that the operations of the algebra.
CS Modular Division and RSA1 RSA Public Key Encryption To do RSA we need fast Modular Exponentiation and Primality generation which we have shown.
MA/CSSE 473 Day 08 Extended Euclid's Algorithm Modular Division Fermat's little theorem.
Tuesday’s lecture: Today’s lecture: One-way permutations (OWPs)
Application: Algorithms Lecture 20 Section 3.8 Wed, Feb 21, 2007.
Ref: Pfleeger96, Ch.31 Properties of Arithmetic Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996.
Lecture 3.1: Public Key Cryptography I CS 436/636/736 Spring 2015 Nitesh Saxena.
CSE 311: Foundations of Computing Fall 2013 Lecture 12: Primes, GCD, modular inverse.
CS 312: Algorithm Analysis Lecture #4: Primality Testing, GCD This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
Application: Algorithms Lecture 19 Section 3.8 Tue, Feb 20, 2007.
Chapter 4 With Question/Answer Animations 1. Chapter Summary Divisibility and Modular Arithmetic - Sec 4.1 – Lecture 16 Integer Representations and Algorithms.
Ch04-Number Theory and Cryptography 1. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
Number-Theoretic Algorithms
Introduction to Cryptography
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Applied Discrete Mathematics Week 4: Number Theory
Prime and Relatively Prime Numbers
Week #5 – 23/25/27 September 2002 Prof. Marie desJardins
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Application: Algorithms
Applied Discrete Mathematics Week 10: Introduction to Counting
Factor A factor of an integer is any integer that divides the given integer with no remainder.
Number Theory.
Presentation transcript:

The Euclidean Algorithm That’s right, it’s real.

Duh it’s real. One of the oldest known algorithms. Used to find the greatest common divisor of two positive integers. The greatest common divisor of a and b is expressed by gcd(a, b).

Mini Examples For example: gcd(12, 18) = 6 And: gcd(420, 66) = 6 And:...you get the idea…

In a Nut Shell Blue collar-ly, there’s a looping process going on that ends when the remainder is finally zero. At this point, the greatest common divisor is the last divisor used. This is the part where you do an example on the board, Harold.

How’s it work Take the larger of the two values that you are finding the gcd for. (I assume a>=b). Divide a by b, getting a quotient and a remainder. Next, divide b by the first remainder that you get, and thus a cycle has begun, and can be seen when arrows are drawn in.

And it can get CRAZY

Proving Euclid Wasn’t Nuts Buckle your seatbelts. This could get rough.

Euclidean Alg. Elsewhere Proving two numbers are relatively prime. Finding modular inverses to help solve and decrypt the RSA algorithm. (which I will NOT go over for your sanity) RSA is public key cryptography. Ooooo look more examples!

Homework Find the gcd(147, 105) Find the gcd(Birthyear, Birthmonth^2) Prove that 1193 and 317 are relatively prime. Then, try using Fermat’s Little Theorem to find the value of x in the equation: 317x = 1 mod 1193