This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 312: Algorithm Analysis Lecture #4: Primality Testing, GCD This work is licensed under a Creative Commons AttributionShare Alike 3.0 Unported License. Slides by: Eric Ringger, with contributions from Mike Jones, Eric Mercer, Sean Warnick Announcements § HW #2 Due Now § Homework: Be sure to show your work § Project #1 § Today we’ll work through the rest of the math § Early: this Friday, 1/13 § Holiday: Monday, 1/16 § Due: next Wednesday, 1/18 Practice Key points: • Represent exponent in binary • Break up the problem into factors (one per binary digit) • Use the substitution rule Practice Two key points: • Represent exponent in binary • Use the substitution rule Objectives § Part 1: § Introduce Fermat’s Little Theorem § Understand and analyze the Fermat primality tester § Part 2: § Discuss GCD and Multiplicative Inverses, modulo N § Prepare to Introduce Public Key Cryptography § This adds up to a lot of ideas! Part 1: Primality Testing Fermat’s Little Theorem If p is prime, then a p1 1 (mod p ) for any a such that 1 a < p Examples: p = 3, a = 2 p = 7, a = 4 How do you wish you could use this theorem? Fermat’s Little Theorem If p is prime, then a p1 1 mod p for any a such that 1 a < p Examples: p = 3, a = 2 p = 7, a = 4 Logic Review a b (a implies b) Which is equivalent to the above statement? § b a § ~a ~b § ~b ~a Logic Review a b (a implies b) Which is equivalent to the above statement?...
View
Full
Document
This note was uploaded on 03/02/2012 for the course C S 312 taught by Professor Jones,m during the Winter '08 term at BYU.
 Winter '08
 Jones,M

Click to edit the document details