RSA 加密 / 解密 在线工具

Browser-only 免费 · 无需注册 · 数据不上传
Key size
Generate a key pair first, or paste PEM keys below. RSA-OAEP (SHA-256) is used. Max plaintext: 190 bytes (2048-bit) or 446 bytes (4096-bit).
Error
PUBLIC KEY (PEM)
PRIVATE KEY (PEM)
PLAINTEXT
CIPHERTEXT (BASE64)
// output appears here

更多开发工具

AES 加密
AES-256
HMAC 生成器
HMAC-SHA256
哈希生成器
MD5/SHA-256
JWT 解码
查看令牌
Base64
编码/解码
密码生成器
安全随机
URL 编码
百分比编码
JSON 格式化
格式化、验证与压缩

为什么这是最好的在线 RSA 加密工具

密钥生成

Generate RSA-2048 or RSA-4096 key pairs in-browser using the Web Crypto API. Keys are exported in standard PEM format, ready for use with OpenSSL, SSH, and any language's crypto library.

RSA-OAEP 填充

Uses RSA-OAEP with SHA-256 — the modern, secure RSA encryption scheme. OAEP adds random padding before encryption, making each ciphertext unique even for the same plaintext and key.

PEM 导入 & 导出

Paste any PEM-encoded RSA public or private key (PKCS#8 / SubjectPublicKeyInfo format) to encrypt or decrypt with existing keys. Compatible with keys generated by OpenSSL, Node.js, Python, and Java.

隐私优先

Keys, plaintext, and ciphertext never leave your browser. No server communication occurs during key generation, encryption, or decryption. Safe for testing with real keys.

常见问题

What is RSA encryption?

RSA is an asymmetric encryption algorithm that uses a public/private key pair. Data encrypted with the public key can only be decrypted with the corresponding private key. RSA is widely used for secure key exchange, digital signatures, and encrypting small amounts of sensitive data like symmetric keys.

What is RSA-OAEP?

RSA-OAEP (Optimal Asymmetric Encryption Padding) is a padding scheme that adds random padding before encryption, making it semantically secure. OAEP is the modern standard and is recommended over the older PKCS#1 v1.5 padding, which is vulnerable to certain attacks.

What is the difference between RSA-2048 and RSA-4096?

RSA-2048 uses a 2048-bit key and is currently considered secure for most applications. RSA-4096 uses a 4096-bit key and provides higher security at the cost of longer key generation and slower operations. RSA-4096 is recommended for long-term data protection.

What is the maximum message size for RSA encryption?

With RSA-OAEP-SHA256, the maximum plaintext size is the key size in bytes minus 66. For RSA-2048 that is 190 bytes; for RSA-4096 it is 446 bytes. For larger data, use hybrid encryption: encrypt the data with AES and encrypt only the AES key with RSA.

深度指南
开发者安全工具指南
哈希、HMAC、AES、RSA 与 JWT
阅读指南