CS284GCD

# CS284GCD - GCD CSCI 284/162 Spring 2009 GW Zm Definition a b(mod m m divides a-b Zm is the"ring of integers modulo m 0 1 2.m-1 with normal addition

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 be any integer of the form

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.

## This document was uploaded on 09/03/2010.

### Page1 / 34

CS284GCD - GCD CSCI 284/162 Spring 2009 GW Zm Definition a b(mod m m divides a-b Zm is the"ring of integers modulo m 0 1 2.m-1 with normal addition

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

View Full Document
Ask a homework question - tutors are online