RSA Encryption and Decryption Tool Online

RSA(Rivest-Shamir-Adleman) is an asymmetric encryption technique that uses two different keys as public and private keys to perform the encryption and decryption. With RSA, you can encrypt sensitive information with a public key and a matching private key is used to decrypt the encrypted message. Asymmetric encryption is mostly used when there are 2 different endpoints are involved such as VPN client and server, SSH, etc.

Below is an online tool to perform RSA encryption and decryption as an RSA calculator.

Generate RSA Key Pair Online

Public Key(X.509 Format)

Private Key(PKCS8 Format)

RSA Encryption and Decryption Online

Below is the tool for encryption and decryption. Either you can use the public/private keys generated above or supply your own public/private keys.

RSA Encryption

Public key Private Key

RSA Decryption

Public key Private Key

Any private or public key value that you enter, or we generate is not stored on this site, this tool is provided via an HTTPS URL to ensure that private keys cannot be stolen.

This tool provides flexibility for RSA encrypt with public key as well as private key along with RSA decrypt with public or private key.

If you appreciate this tool then you can consider:

  • We are thankful for your never ending support.

For Java implementation of RSA, you can follow this article.

First, we require public and private keys for RSA encryption and decryption. Hence, below is the tool to generate RSA key online. It generates RSA public key as well as the private key of size 512 bit, 1024 bit, 2048 bit, 3072 bit and 4096 bit with Base64 encoded.

By default, the private key is generated in PKCS#8 format and the public key is generated in X.509 format.

*Note: You can directly share your feedback or suggestion about this tool here on contact us page.

Usage Guide

Below is the usage guide of this tool.

RSA Public and Private Keys

In the first section of this tool, you can generate public and private keys. The private key is used to generate digital signatures, and the public key is used to verify the digital signatures.

To generate the keys, select the RSA key size among 515, 1024, 2048 and 4096 bit and then click on the button to generate the keys for you.

Since 2015, NIST recommends a minimum of 2048-bit keys for RSA. A 4096 bit key size does provide a reasonable increase in strength over a 2048 bit key size but the encryption strength doesn't drop off after 2048 bits. There's a significant increase in CPU usage as a result of a 4096 bit key size. Hence, it is recommended to use 2048-bit keys.

RSA Encryption

For encryption and decryption, enter the plain text and supply the key. As the encryption can be done using both the keys, you need to tell the tool about the key type that you have supplied with the help of a radio button. By default, public key is selected. Then, you can use the cipher type to be used for the encryption. The different cipher options are RSA, RSA/ECB/PKCS1Padding and RSA/ECB/OAEPWithSHA-1AndMGF1Padding. Now, once you click the encrypt button the encrypted result will be shown in the textarea just below the button.

Remember, the encrypted result is by default base64 encoded.

RSA Decryption

Similarly, for decryption the process is the same. Here, you need to enter the RSA encrypted text and the result will be a plain-text. You have both the options to decrypt the encryption with either public or private keys.

References