2
0

generate 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. From: stewarts@ix.netcom.com (Bill Stewart)
  2. Newsgroups: sci.crypt
  3. Subject: Re: Diffie-Hellman key exchange
  4. Date: Wed, 11 Oct 1995 23:08:28 GMT
  5. Organization: Freelance Information Architect
  6. Lines: 32
  7. Message-ID: <45hir2$7l8@ixnews7.ix.netcom.com>
  8. References: <458rhn$76m$1@mhadf.production.compuserve.com>
  9. NNTP-Posting-Host: ix-pl4-16.ix.netcom.com
  10. X-NETCOM-Date: Wed Oct 11 4:09:22 PM PDT 1995
  11. X-Newsreader: Forte Free Agent 1.0.82
  12. Kent Briggs <72124.3234@CompuServe.COM> wrote:
  13. >I have a copy of the 1976 IEEE article describing the
  14. >Diffie-Hellman public key exchange algorithm: y=a^x mod q. I'm
  15. >looking for sources that give examples of secure a,q pairs and
  16. >possible some source code that I could examine.
  17. q should be prime, and ideally should be a "strong prime",
  18. which means it's of the form 2n+1 where n is also prime.
  19. q also needs to be long enough to prevent the attacks LaMacchia and
  20. Odlyzko described (some variant on a factoring attack which generates
  21. a large pile of simultaneous equations and then solves them);
  22. long enough is about the same size as factoring, so 512 bits may not
  23. be secure enough for most applications. (The 192 bits used by
  24. "secure NFS" was certainly not long enough.)
  25. a should be a generator for q, which means it needs to be
  26. relatively prime to q-1. Usually a small prime like 2, 3 or 5 will
  27. work.
  28. ....
  29. Date: Tue, 26 Sep 1995 13:52:36 MST
  30. From: "Richard Schroeppel" <rcs@cs.arizona.edu>
  31. To: karn
  32. Cc: ho@cs.arizona.edu
  33. Subject: random large primes
  34. Since your prime is really random, proving it is hard.
  35. My personal limit on rigorously proved primes is ~350 digits.
  36. If you really want a proof, we should talk to Francois Morain,
  37. or the Australian group.
  38. If you want 2 to be a generator (mod P), then you need it
  39. to be a non-square. If (P-1)/2 is also prime, then
  40. non-square == primitive-root for bases << P.
  41. In the case at hand, this means 2 is a generator iff P = 11 (mod 24).
  42. If you want this, you should restrict your sieve accordingly.
  43. 3 is a generator iff P = 5 (mod 12).
  44. 5 is a generator iff P = 3 or 7 (mod 10).
  45. 2 is perfectly usable as a base even if it's a non-generator, since
  46. it still covers half the space of possible residues. And an
  47. eavesdropper can always determine the low-bit of your exponent for
  48. a generator anyway.
  49. Rich rcs@cs.arizona.edu