RSA Algorithm Javascript Page

RSA Algorithm Javascript Page

Welcome to the cryptography home (designed by Cary Sullivan and Rummy Makmur.) We have designed a model of RSA public-key cryptosystem. Following a brief background and description, you can ask another person to encrypt a "message"( actually a letter) and let you decrypt it, using your computer-generated private key. Enjoy. If you have any comments, do not hesitate to contact us.

INTRODUCTION TO RSA

RSA is a public-key cryptosystem developed by MIT professors: Ronald L. Rivest, Adi Shamir, and Leonard M. Adleman in 1977 in an effort to help ensure internet security. As Steve Burnett of RSA Data Security, Inc. described it, a cryptosystem is simply an algorithm that can convert input data into something unrecognizable (encryption), and convert the unrecognizable data back to its original form (decryption).

To encrypt data, enter the data ("plaintext") and an encryption key to the encryption portion of the algorithm. To decrypt the "ciphertext," a proper decryption key is used at the decryption portion of the algorithm. Those keys, which contains simply a string of numbers, are called public key and private key, respectively. For example, suppose Alice intends to send e-mail to Bob. Through a public-key directory, she finds his public key. Then, she encrypts her message using the key and send it to Bob. This public key, however, will not decrypt the ciphertext. Knowledge of Bob's public key will not help an eavesdropper. In order for Bob to decrypt his ciphertext, he must use his private key. If Bob wants to respond to Alice, he encrypts his message using her public key.

The challenge of public-key cryptography is developing a system in which it is impossible to determine the private key. This is accomplished through the use of a one-way function. With a one-way function, it is relatively easy to compute a result given some input values. However, it is extremely difficult, nearly impossible, to determine the original values if you start with the result. In mathematical terms, given x, computing f(x) is easy, but given f(x), computing x is nearly impossible. The one-way function used in RSA is multiplication of prime numbers. It is easy to multiply two big prime numbers, but for most very large primes, it is exremely time-consuming to factor them. Public-key cryptography uses this function by building a cryptosystem which uses two large primes to build the private key and the product of those primes to build the public key.

 

The Model

RSA uses modular arithmatic and elementary number theory to do certain computation. Before you start, please make sure you understand how it works. And, also remember, our model is nothing compared to the REAL RSA algorithm which involves two LARGE primes and messages of unconditional length. In our model, VERY small primes are used and only one letter will be encrypted.

Instructions:

  • This model is best carried out by two persons. Name them Alice and Bob.
這個模型最好有兩個人執行,一個叫Alice,一個叫Bob
  • Alice will pick two available primes. Public and private keys will be generated by computer.
Alice產生兩個素數。公開鑰匙和私有鑰匙由計算機產生。
  • Record the public key containing the exponent value, E and the product of the primes, N. And, record the private key, D.
記錄的公開鑰匙包含指數值E,和生成的素數N。並且記錄私有鑰匙D。
  • Give E and N to Bob (your partner).
把E和N給Bob。
  • Bob will go to another page to pick a letter to encrypt. Enter E and N. The encrypted message / number will be generated.
Bob將找出一個要加密的字母。並鍵入E和N。生成加密後的數據。
  • Bob will send or give the encrypted message to Alice.
Bob將把加密的數據傳給Alice。
  • Alice will go to decryption page. Enter the message, D and N. The message will be decrypted to the original letter. Later, Alice can check with Bob to see if it is the right letter.
Alice進入解密頁。鍵入Bob傳來的數據、D和N。這個數據將解密成原始的字母。

 

Remember, the main purpose of this model is understanding the RSA algorithm, not necessarily for encryption purpose. A lot of simplification has been made, while the mathematics and algorithm stay the same. So, ENJOY !

Now, proceed to: key generation page, encryption page, or decryption page.

 


For more information about RSA algorithm, check out RSA homepage.

 

[email protected]
[email protected]

This is page is created on June 12, 1996.
<script></script> Last updated on 07/11/2009 13:10:30.

發佈了68 篇原創文章 · 獲贊 5 · 訪問量 4714
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章