Article View: sci.crypt
Article #3630generating RSA keys
From: uucp
Date: Fri, 05 Jun 1987 19:41
Date: Fri, 05 Jun 1987 19:41
45 lines
2203 bytes
2203 bytes
I have been working on a RSA encryption program and have come across an
interesting problem. There are several rules by which you must pick
a key to achieve good RSA encryption. Given p and q, these are:
1... d must be relatively prime to phi(n). In other words
gcd (d, phi(n)) = 1
2... max(p,q) < d < n
3... inv(d, phi(n)) > log(n) {base 2}
Where n=pq, phi(n)=(p-1)(q-1), d=user key, e=inv(d,phi(n)),
gcd is greatest common divisor, and inv is modulo inverse
I have been trying to come up with a scheme to implement an algorithm
that would allow the user to pick any key (presumably text), and map it
to a _good_ key (as defined above).
The only scheme that I have come up with so far is as follows:
A. Get key text from user.
B. Map to a number (one to one mapping).
C. Verify that the key meets above requirements.
D. If key does not meet above requirements, increment the
key by one, and goto C.
Else done.
I have been trying to find any weaknesses in this scheme (such as dramatically
reducing the number of possible keys, etc.). While the scheme does reduce
the number of keys, it also will guarentee the generation of a good key.
My feeling is that if the key text that is gotten from the user is long
enough (say 10 characters, 6 bits per char -- around 60 unique bits
or from 1 to 1E19), then the results should be fairly good.
Does this sound like a reasonable scheme? Also, does anyone know of any
existing schemes to implement good RSA key choice?
Thanks!
Bruce Martin
Bruce K. Martin ...!ucbvax!iris!martin
iris!martin@ucbvax.berkeley.edu
Technical Details
Message-ID:
<537@ucdavis.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!husc6!think!ames!ucbcad!ucbvax!ucdavis!deneb!uucpShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!husc6!think!ames!ucbcad!ucbvax!ucdavis!deneb!uucp From: uucp@ucdavis.UUCP (uucp) Newsgroups: sci.crypt Subject: generating RSA keys Message-ID: <537@ucdavis.UUCP> Date: Fri, 5-Jun-87 15:41:57 EDT Article-I.D.: ucdavis.537 Posted: Fri Jun 5 15:41:57 1987 Date-Received: Wed, 10-Jun-87 01:11:09 EDT Reply-To: martin!iris@ucbvax.berkeley.edu (Bruce K. Martin Jr.) Distribution: world Organization: University of California, Davis Lines: 45 Keywords: Keys, RSA