Javascript Crypto Elements:


RC4 encoding:

Demonstrates the RC4 encryption script, together with base64-type encoding.

Functions used:

key:
text:

Source:
function rc4encrypt() {
document.rc4.text.value=textToBase64(rc4(document.rc4.key.value,document.rc4.text.value))
}
function rc4decrypt() {
document.rc4.text.value=(rc4(document.rc4.key.value,base64ToText(document.rc4.text.value)))
}


THIS JUST IN!!!

I have a working key generator and have totally rewritten the long-math functions. See the results here!

Ignore the rest of this...


RSA-type:

Note that long keys will likely be slow. Let me know what size keys are practical on your system...

keylength: how many bytes  
key: binary (ones & zeros)

modulo:

binary
text: For sample values you can use:
public key: 10001
modulo: 110010100001
private key: 101011000001


Other...

I have working functions to generate n-bit primes and GCD. I'm working on generateing RSA-type keys, but it's not all there yet. View the source to see what is there.

More later.