home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / sci / math / 15057 < prev    next >
Encoding:
Internet Message Format  |  1992-11-16  |  1.7 KB

  1. Xref: sparky sci.math:15057 sci.math.num-analysis:3321
  2. Path: sparky!uunet!utcsri!torn!utzoo!dciem!jorchard
  3. From: jorchard@dciem.dciem.dnd.ca (Jeff Orchard)
  4. Newsgroups: sci.math,sci.math.num-analysis
  5. Subject: RSA Scheme for Encryption/Decryption
  6. Message-ID: <6633@dciem.dciem.dnd.ca>
  7. Date: 16 Nov 92 15:50:16 GMT
  8. Reply-To: jorchard@dretor.dciem.dnd.ca
  9. Followup-To: sci.math
  10. Organization: Defence and Civil Institute of Environmental Medicine
  11. Lines: 34
  12.  
  13. I asked...
  14. >I would like to know the algorithm for encrypting/decrypting codes
  15. >with the RSA scheme.
  16.  
  17. Here is what I was sent...
  18.  
  19. From duvallp@hamlet.uncg.edu Wed Nov 11 19:37:52 1992
  20.  
  21.   You've probably gotten a zillion replies, but ....
  22.  
  23.   Choose two primes, p and q. Let M = pq, and F = phi(pq) = (p-1)(q-1).
  24.   Choose a number e and let d be the solution to ed = 1 mod F. (You
  25.   have to pick e relatively prime to F.) Publish M and e, keep p,q,F,
  26.   and d secret. If x is the message, 0<x<M, I send y = x^e mod M to 
  27.   you. You then compute y^d mod M. Since x^F = 1 mod M by Fermat's 
  28.   little theorem, (actually Euler's refinement), you get
  29.    y^d = x^ed = x^(kF + 1) = x mod M, and recover the message. 
  30.   There's a good treatment in "Elementary Number Theory and Its
  31.   Applications," by K. Rosen, Addison Wesley. I also seem to remember a
  32.   nice discussion in Knuth's "Art of Computer Programming, Vol.II,"
  33.   but I don't have that in front of me.
  34.      pd
  35.  
  36.  
  37. -- 
  38.  
  39.  Paul Duvall                   Department of Mathematics
  40.  duvallp@hamlet.uncg.edu       University of North Carolina 
  41.  duvallp@uncg.bitnet                    at Greensboro
  42.  duvallp@mcduff.uncg.edu       Greensboro, NC 27412
  43.                                (919) 334 5836   
  44.  
  45. Jeff Orchard    jorchard@dretor.dciem.dnd.ca
  46. Dept. of National Defence, Toronto, Canada
  47.