RSA implementation in JavaScript