home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.crypt
- Path: sparky!uunet!telebit!phr
- From: phr@telebit.com (Paul Rubin)
- Subject: Re: RSA questions
- In-Reply-To: tsa@cellar.org's message of 15 Dec 92 00:47:07 GMT
- Message-ID: <PHR.92Dec14202839@napa.telebit.com>
- Sender: news@telebit.com
- Nntp-Posting-Host: napa.telebit.com
- Organization: Telebit Corporation; Sunnyvale, CA, USA
- References: <9cTsVB4w164w@cellar.org>
- Date: 14 Dec 92 20:28:39
- Lines: 20
-
- I read the article in popular mechanics and have a few questions
- about how RSA works. You take the ASCII value of the number,
- raise it to an arbitrary high power, and mod it by the public key,
- correct? But how do you decrypt it?
-
- The message "x" is just a number, not an ascii value.
-
- RSA works like this:
- 1. Pick two large primes p and q (with certain extra properties). Let N=pq.
- 2. Pick random exponent s. The pair (N, s) will be the public key.
- 3. Compute secret key t, so that st = 1 mod (p-1)(q-1). You can do
- this efficiently if you know p and q, but it is intractable otherwise.
- 4. To encrypt: E(x) = x^s mod N.
- 5. To decrypt: D(y) = y^t mod N.
-
- From number theory, it turns out that x^st mod N is just x.
- (This is because st = 1 mod phi(N), where phi(N) is the Euler
- totient function, equal to (p-1)(q-1) when N=pq.)
-
- Thus, D(E(x)) = x.
-