Lecture04-primality

Lecture04-primality - CS 312: Algorithm Analysis Lecture...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 312: Algorithm Analysis Lecture #4: Primality Testing, GCD This work is licensed under a Creative Commons Attribution-Share 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 well 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 Fermats 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 Fermats Little Theorem If p is prime, then a p-1 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? Fermats Little Theorem If p is prime, then a p-1 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

Page1 / 39

Lecture04-primality - CS 312: Algorithm Analysis Lecture...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online