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

All rights reserved reproduction whole or in part in

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: 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 ----------- An Example Let’s look at this protocol in action with small numbers. If n = 35 (the two primes are 5 and 7), then the possible quadratic residues are: 1: x2 a 1 (mod 35) has the solutions: x = 1, 6, 29, or 34. 4: x2 a 4 (mod 35) has the solutions: x = 2, 12, 23, or 33. 9: x2 a 9 (mod 35) has the solutions: x = 3, 17, 18, or 32. 11: x2 a 11 (mod 35) has the solutions: x = 9, 16, 19, or 26. 14: x2 a 14 (mod 35) has the solutions: x = 7 or 28. 15: x2 a 15 (mod 35) has the solutions: x = 15 or 20. 16: x2 a 16 (mod 35) has the solutions: x = 4, 11, 24, or 31. 21: x2 a 21 (mod 35) has the solutions: x = 14 or 21. 25: x2 a 25 (mod 35) has the solutions: x = 5 or 30. 29: x2 a 29 (mod 35) has the solutions: x = 8, 13, 22 or 27. 30: x2 a 30 (mod 35) has the solutions: x = 10 or 25. The inverses (mod 35) and their square roots are: v v-1 s = sqrt (v-1) 111 493 942 11 16 4 16 11 9 29 29 8 Note that 14, 15, 21, 25, and 30 do not have inverses mod 35, because they are not relatively prime to 35. This makes sense, because there should be (5 - 1) * (7 - 1)/4 quadratic residues mod 35 relatively prime to 35: That is gcd(x,35) = 1 (see Section 11.3). So, Peggy gets the public key consisting of k = 4 values: {4,11,16,29}. The corresponding private key is {3,4,9,8}. Here’s one round of the protocol. (1) Peggy chooses a random r = 16, computes 162 mod 35 = 11, and sends it to Victor. (...
View Full Document

Ask a homework question - tutors are online