Example of rsa implementation in JavaScript on server and client