Zhou_Zhang_HW3

# Zhou_Zhang_HW3 - Zhou HuanXian(0225418 Zhang Huan(0336630...

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

Zhou, HuanXian (0225418) Zhang, Huan (0336630) CS392 HW3 HW #3: Number Theory/Design Principles/Threat Modeling CS 392/6813: Computer Security Fall 2010 [100pts] DUE 10/22/2010 at Midnight Problem 1 [10*3=30pts] 1) We discussed how to use the Euclidian algorithm to compute the GCD of two numbers. Use this algorithm to compute the following values. Show all of the steps involved. a. The GCD of 56 and 125. Euclidian algorithm: If y = ax + b then gcd(x,y) = gcd(x,b) 125 = (a)*56 + b 125 = int(125/56)*56 + 125%56 125 = 2*56 + 13 gcd(56 ,13) 56 = (a)*13 + b 56 = 4*13 + 4 gcd(13,4) = 1 gcd(56, 125) = gcd(56,13) = gcd(13 ,4) = 1 b. The GCD of 52 and 876. 876 = (a)*52 + b 876 = int(876/52)*52 + 876%52 876 = 16*52 + 44 gcd(52 ,44) 52 = (a)*44 + b 52 = 1*44 + 8 gcd(44, 8) 44 = 5*8 + 4 gcd(8, 4) = 4 gcd(52, 876) = gcd(52 ,44) = gcd(44, 8) = gcd(8,4) = 4 2) We also discussed the use of the Extended Euclidian algorithm to calculate modular inverses. Use this algorithm to compute the following values. Show all of the steps involved.

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

View Full Document
a. 957895 -1 (mod 1229399450) Since the gcd of 957895 and 1229399450 is not 1, they are not relatively prime to each other, thus they don’t have modular inverse. b. 13 -1 (mod 31) Refer to: http://math.ucdenver.edu/~wcherowi/courses/m5410/exeucalg.html 31 = 2*13+5 p0 = 0 13 = 2*5+3 p1 = 1 5 = 1*3+2 p2 = 0 – 1(2) mod 31 = -2 mod 31 = 29 3 = 1*2+1 p3 = 1 – 29(2) mod 31 = -57 mod 31 = 5 2 = 2*1+0 p4 = 29 – 5(1) mod 31 = 24 mod 31 = 24
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 11/02/2010 for the course CS 392 taught by Professor Staff during the Spring '08 term at NYU Poly.

### Page1 / 4

Zhou_Zhang_HW3 - Zhou HuanXian(0225418 Zhang Huan(0336630...

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

View Full Document
Ask a homework question - tutors are online