Lecture04-primality

# Lecture04-primality - CS 312 Algorithm Analysis Lecture#4...

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

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

View Full Document

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

View Full Document

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

View Full Document

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

View Full Document

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

View Full Document
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 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 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? Fermat’s 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

## 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.

### Page1 / 39

Lecture04-primality - CS 312 Algorithm Analysis Lecture#4...

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

View Full Document
Ask a homework question - tutors are online