RSA Encryption
This project is an implementation of the RSA encryption algorithm. It can generate a pair of keys (one public, one private) and encrypt/decrypt text using them.
It is implemented pretty inefficiently and probably very insecurely, but serves as a proof of concept/demonstration. This should not be used for anything private/important.
All numbers are respresented as in base64. I’m not sure if I have done this in a standard way but it works and is enough to reduce the numbers in length to be a bit more managable.
The size of the numbers used/keys generated can be controlled using the ‘Prime bits’ input, which sets the number of bits to use when generating prime numbers. In my experience, it starts to take significant amounts of time to generate the keys as this approaches 1000. Note: the page will freeze during long running calculations/functions, such as generating keys and encrypting text.
Encrypted/decrypted message: