惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

www.infosecurity-magazine.com
www.infosecurity-magazine.com
D
DataBreaches.Net
T
Tailwind CSS Blog
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
F
Full Disclosure
V2EX - 技术
V2EX - 技术
N
News and Events Feed by Topic
Help Net Security
Help Net Security
L
LangChain Blog
Y
Y Combinator Blog
宝玉的分享
宝玉的分享
Google Online Security Blog
Google Online Security Blog
P
Proofpoint News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
B
Blog RSS Feed
N
Netflix TechBlog - Medium
N
News | PayPal Newsroom
TaoSecurity Blog
TaoSecurity Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
Vulnerabilities – Threatpost
B
Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
I
Intezer
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
AI
AI
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cyberwarzone
Cyberwarzone
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
G
GRAHAM CLULEY
Vercel News
Vercel News
罗磊的独立博客
MyScale Blog
MyScale Blog
Last Week in AI
Last Week in AI
博客园 - 司徒正美
C
CERT Recently Published Vulnerability Notes
GbyAI
GbyAI
Scott Helme
Scott Helme
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Troy Hunt's Blog
A
About on SuperTechFans
P
Privacy International News Feed

Mr. Will

Teaching AI When to Stay Silent 不会翻译的话,其实可以不翻译的 Announcing The Vernal Fortnightly 2025 年终总结 Tailwind as a Headwind My Home Page, Reimagined Kickstarting a New Mac Refining My Domain Email 2024:浏览器从 A 到 Z 数模转换:微喷打印影像输出! “严谨”的混乱——数学 2023 年度总结 这不过是个开场 Hello, Tags, Categories, LaTeX and Rainbow! About Comments GitHub's Own Dark Mode! Theme Cupertino is Updated From Now on, I Can't Respond on Weekdays Apple Newsroom's UI is Updated
Encrypt it on Your Own!
Mr. Will · 2021-08-14 · via Mr. Will

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:

1
$ npm install -g rsa-cli

Yarn is also supported:

1
$ 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:

0x00

1
$ 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 -l flag:

1
$ rsa generate [keyName] -l 4096

Remember [keyName], it’s needed for next steps.

0x01

Get your public key by running:

1
2
3
4
5
6
7
8
9
10
$ rsa get [keyName]
Public key of key pair '[keyName]':
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEAv1n2RwSVDyfd7wsWo5g9Q3bG2uTU4eLxFFgX4coUSRYQKjVXH2zp
8QUmaRghF3qTumlWzCY6WJUvYQl6alu1/VrLOUCeQCat74nLxlIWI44GCB7vhGrC
ktqTpaVmFxa4aOAXT7WLGA15wcaW7hS4mdgbwehx4Bqisk+SjZqJ017ASBFMz02m
RNpKjQoJgRQWdDsr/VDNEKbAYl2ghVlTT9yidiCBJlLISkhTvLVmMzd2ULPzoa9F
8rXxpWJ/4j+rKJKpOaGJIKYCLTgZOXHLHZE7vPxBNK8L/nAV4XDI0S+QSwqVFR0A
uhXiHquN1Ae7wiyljqbei3vZylIYAaIkywIDAQAB
-----END RSA PUBLIC KEY-----

Copy -----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:

1
$ rsa import [yourFriendsKeyName] --public [path-to-the-file]

The next step is to encrypt a message:

1
$ rsa encrypt [yourFriendsKeyName] '[message]'

Finally, tell your friend to copy the output and send it to you.

0x02

After receiving the encrypted message from your friend, you can now decrypt it:

1
$ 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.