{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CS284GCD

# CS284GCD - GCD CSCI 284/162 Spring 2009 GW Zm Definition a...

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

CSCI 284/162 Spring 2009 GW GCD

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

View Full Document
05/13/09 CS284-162/Spring09/GW/Vora/GCD 2 Z m Definition: a b ( mod m) m divides a-b Z m is the “ring” of integers modulo m : 0, 1, 2, …m-1 with normal addition and multiplication, performed modulo m We define a mod m to be the unique remainder of a when divided by m , i.e. a mod m Z m
05/13/09 CS284-162/Spring09/GW/Vora/GCD 3 Examples: multiplicative inverses Inverse of -1 mod m (for any m ) Or m -1 mod m

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

View Full Document
05/13/09 CS284-162/Spring09/GW/Vora/GCD 4 Affine Cipher P = C = R K R × R e K (x) = ax + b d K (x) = a -1 (x – b) Key may be written as: (a, b) or a=; b= Example How many keys when R = Z 4
05/13/09 CS284-162/Spring09/GW/Vora/GCD 5 To know if a is invertible, need definition of GCD The gcd (Greatest Common Divisor) of two integers m and n denoted gcd(m , n ) is the largest non-negative integer that divides both m and n .

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

View Full Document
05/13/09 CS284-162/Spring09/GW/Vora/GCD 6 Multiplicative inverse of a in Z m Theorem: The multiplicative inverse of a mod m Z m , denoted a -1 , exists if and only if gcd(m, a) = 1 Need show: i. a -1 exists gcd(m, a) = 1 ii. gcd(m, a) = 1 a -1 exists
05/13/09 CS284-162/Spring09/GW/Vora/GCD 7 Proof: (i) a -1 exists gcd(m, a) = 1 Suppose a -1 exists, call it t at 1 (mod m) at + ms = 1 for some integer s gcd(m, a) = 1 (because the gcd divides both sides of above equation, and only 1 can divide the rhs)

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

View Full Document
05/13/09 CS284-162/Spring09/GW/Vora/GCD 8 Proof: ii. gcd(m, a) = 1 a -1 exists This involves a bit more work. We show the following, A. 5 integers s , t , such that ms + at = gcd(m, a) Hence, gcd(m, a) = 1 5 integers s , t , such that ms + at = 1 B. 5 integers s , t , such that ms + at = 1 a -1 exists
05/13/09 CS284-162/Spring09/GW/Vora/GCD 9 Proof of ii A: 5 s , t , such that ms + at = gcd(m, a) Let x

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.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern