load('jsbn.js') load('jsbn2.js') load('rsa.js') load('rsa2.js') //load random number generator //TODO: plug-in sjcl random generator load('prng4.js') load('rng.js') //next 2 scripts add a method to read an rsa key in the pem format load('asn1hex.js') load('rsa-pem.js') load('base64.js') key_string = read('key.pem') key = new RSAKey() key.readPrivateKeyFromPEMString(key_string) cypher = key.encrypt("Guillaume est plus fort que Thibaut") test = key.decrypt(cypher)