Home > Demos > JavaScript RSA Class (Public Key Cryptography)   lib.RSA.php   BigInt.js   RSA.js

Ok, so it's not the fastest thing around. But it can be done. The example below uses a 31-hex-digit (124-bit) modulus with my multiple-precision math library, all written in JavaScript. The encryption exponent is small-ish, making for faster encryption. (Presumably, decryption would be handled on the server, where things aren't as slow.) A truly secure system would certainly need a larger key, and would be even more painfully slow. Hey, it's the concept that counts.

Plaintext
 

Ciphertext
 

Verification


Messages
 

See
RSA In JavaScript - Dave Service Pack 2.h3)P

$CVSHeader: _freebeer/www/demo/lib.RSA.php,v 1.2 2004/03/07 17:51:34 ross Exp $