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

Reproduction whole or in part in any form or medium

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: . For example, 3 is not a generator because there is no solution to 3a = 2 (mod 11) In general, testing whether a given number is a generator is not an easy problem. It is easy, however, if you know the factorization of p - 1. Let q1, q2,..., qn be the distinct prime factors of p - 1. To test whether a number g is a generator mod p, calculate g(p- 1)/q mod p for all values of q = q1, q2,..., qn. If that number equals 1 for some value of q, then g is not a generator. If that value does not equal 1 for any values of q, then g is a generator. For example, let p = 11. The prime factors of p - 1 = 10 are 2 and 5. To test whether 2 is a generator: 2(11- 1)/5 (mod 11) = 4 2(11- 1)/2 (mod 11) = 10 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 ----------- Neither result is 1, so 2 is a generator. To test whether 3 is a generator: 3(11- 1)/5 (mod 11) = 9 3(11- 1)/2 (mod 11) = 1 Therefore, 3 is not a generator. If you need to find a generator mod p, simply choose a random number from 1 to p - 1 and test whether it is a generator. Enough of them will be, so you’ll probably find one fast. Computing in a Galois Field Don’t be alarmed; that’s what we were just doing. If n is prime or the power of a large prime, then we have what mathematicians call a finite field . In honor of that fact, we use p instead of n. In fact, this type of finite field is so exciting that mathematicians gave it its own name: a Galois field, denoted as GF(p). (...
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