applied cryptography - protocols, algorithms, and source code in c

Definition 2 j0n 0 definition 3 if n is prime then

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: = (p- 1)(q- 1). These numbers appear in some public-key algorithms; this is why. According to Euler’s generalization of Fermat’s little theorem, if gcd(a,n) = 1, then aÆ(n) mod n = 1 Now it is easy to compute a-1 mod n: x = aÆ(n)-1 mod n For example, what is the inverse of 5, modulo 7? Since 7 is prime, Æ(7) = 7- 1 = 6. So, the inverse of 5, modulo 7, is 56-1 mod 7 = 55 mod 7 = 3 Both methods for calculating inverses can be extended to solve for x in the general problem (if gcd(a,n) = 1): (a*x) mod n = b Using Euler’s generalization, solve x = (b*a Æ(n)-1) mod n Using Euclid’s algorithm, solve x = (b*(a-1 mod n)) mod n In general, Euclid’s algorithm is faster than Euler’s generalization for calculating inverses, especially for numbers in the 500-bit range. If gcd(a,n) ` 1, all is not lost. In this general case, (a*x) mod n = b, can have multiple solutions or no solution. Chinese Remainder Theorem If you know the prime factorization of n, then you can use something called the Chinese remainder theorem to solve a whole system of equations. The basic version of this theorem was discovered by the first-century Chinese mathematician, Sun Tse. Previous Table of Contents Next Products | Contact Us | About Us | Privacy | Ad Info | Home Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. To access the contents, click the chapter and section titles. Applied Cryptography, Second Edition: Protocols, Algorthms, and Source Code in C (cloth) Go! Keyword Brief Full Advanced Search Search Tips (Publisher: John Wiley & Sons, Inc.) Author(s): Bruce Schneier ISBN: 0471128457 Publication Date: 01/01/96 Search this book: Go! Previous Table of Contents Next ----------- In general, if the prime factorization of n is p1*p2*...*pt, then the system of equations (x mod pi) = ai, where i = 1, 2,..., t has a unique solution, x, where x is less than n. (Note that s...
View Full Document

This note was uploaded on 10/18/2010 for the course MATH CS 301 taught by Professor Aliulger during the Fall '10 term at Koç University.

Ask a homework question - tutors are online