Javascript RSA Algorithm Demonstration.
I created this demonstration of the RSA algorithm for a course that I took about data structures and algorithms. Javascript has some limitations on handling large numbers - I compensated for some of these with the Extended Euclidean and Russian Peasant algorithms, but there are still some problems, depending on the choice of P and Q. The defaults values work. For more information on the RSA algorithm, follow the links at the end of the page. Step 1: | Select two numbers which have no common factors. Call them P and Q. Since they have no common factors, they are said to be "relatively prime." You can enter your own values for P and Q, or use the default values provided. |
| |
Step 2: | Select the public key, E to be relatively prime to M. |
| |
Step 3: | Select the private key, D, so that (D * E) % M = 1. |
| |
Step 4: | Encrypt and Decrypt your message. The message must be an integer with a magnitude less than (N-1). |
| |
0 comments:
Post a Comment