RSA In JavaScript  
 

The example below uses my 100% JavaScript multiple-precision math library. The encryption exponent is small-ish, making for faster encryption. Presumably, decryption would be handled on the server, where things aren't as slow.

In a nutshell, here are the JavaScript files you need:

Additionally, I wrote a Windows application that generates random keys for use with the JavaScript library. It even generates the JavaScript source code. Paste and go!

Note: The RSA key generator application is written in Delphi 4, which is Object Pascal. This includes a re-implementation of the multiple-precision library and the Miller-Rabin test for primality. Keys are generated using Algorithm 8.1 from the Handbook of Applied Cryptography. However, the actual random-number generation is not particularly robust. I just use the built-in functions in Delphi, seeded from the system clock. If you want to get fancy, you should write a better random-number generator.

Hey, remember rainbow animated horizontal rules?

Key size: bits     Display radix:    
 
Plaintext
 
Ciphertext
Verification
Messages
 
Home Spoon River Markup Language Johnny Calls! The Coolest Pamphlet Ever Photo Gallery Delphi Code You Are Here Wallpaper Changer Builder 6 Pedal Steel Tabs Guitar Tabs The Mulder Photo Gallery A Trying Experience My Silly Little UnGraph The Bands About Me Contact Me