Recently, I’ve written a CLI for RSA encryption and decryption - RSA CLI.
RSA CLI is based on Node.js, works perfectly with all the desktop platforms.
If you have Node.js environment on your device, with the help of npm, you can install it by running a single line of command:
$ npm install -g rsa-cli
Yarn is also supported:
$ yarn global add rsa-cli
Without Node.js environment, it’s still easy to install. Just download the executable for your device in GitHub Releases and execute it.
Now start encrypting:
$ rsa generate [keyName]
Run the command above to generate a new key pair. Modulus length is 2048 by default, and if you want to change it, use
$ rsa generate [keyName] -l 4096
[keyName], it’s needed for next steps.
Get your public key by running:
$ rsa get [keyName]
-----BEGIN RSA ...... END RSA PUBLIC KEY----- and save it to a file, then send this file to your friend.
Your friend should also install RSA CLI, he/she need to download it and import it:
$ rsa import [yourFriendsKeyName] --public [path-to-the-file]
The next step is to encrypt a message:
$ rsa encrypt [yourFriendsKeyName] '[message]'
Finally, tell your friend to copy the output and send it to you.
After receiving the encrypted message from your friend, you can now decrypt it:
$ rsa decrypt [keyName] '[the-encrypted-message-from-your-friend]'
Done! you got the decrypted message from the output.
I think privacy should be in your control. You should not trust anyone who can’t proof your privacy is encrypted and private. Trust yourself. RSA CLI is an easy way to encrypt and decrypt on your own, which means you can really know your privacy is encrypted. Without private key, no one can decrypt your messages.
But why trusting RSA CLI? Because it’s fully open source.
About this Post
This post is written by Mr. Will, licensed under CC BY-NC 4.0.