This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ypted message, c, will be made up of similarly sized message blocks, ci, of about the same length. The encryption formula is simply ci = mie mod n To decrypt a message, take each encrypted block ci and compute mi = cid mod n Since cid = (mie)d = mied = mik(p  1)(q 1)+ 1 = mi mik(p 1)(q 1) = mi*1 = mi; all (mod n) the formula recovers the message. This is summarized in Table 19.2. The message could just as easily have been encrypted with d and decrypted with e; the choice is arbitrary. I will spare you the number theory that proves why this works; most current texts on cryptography cover it in detail. A short example will probably go a long way to making this clearer. If p = 47 and q = 71, then Table 19.2 RSA Encryption Public Key: n product of two primes, p and q (p and q must remain secret) e relatively prime to (p  1)(q  1) Private Key: d e1 mod ((p  1)(q  1)) Encrypting: c = me mod n Decrypting: m = cd mod n n = pq = 3337 The encryption key, e, must have no factors in common with (p  1)(q  1) = 46 * 70 = 3220 Choose e (at random) to be 79. In that case d = 791 mod 3220 = 1019 This number was calculated using the extended Euclidean algorithm (see Section 11.3). Publish e and n, and keep d secret. Discard p and q. To encrypt the message m = 6882326879666683 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 © 19962000 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...
View Full
Document
 Fall '10
 ALIULGER
 Cryptography

Click to edit the document details