RSA Encryption/Decryption Tool
Public key encryption, private key decryption with key generation and digital signing
About RSA Encryption
RSA is an asymmetric encryption algorithm invented by Ron Rivest, Adi Shamir, and Leonard Adleman in 1977. RSA is one of the most widely used public-key encryption algorithms, applied in data encryption, digital signatures, and key exchange.
RSA security is based on the difficulty of factoring large integers. It uses a pair of keys: a public key for encryption and a private key for decryption. The public key can be distributed openly, while the private key must be kept secret.
Features
- Key pair generation: Supports 1024, 2048, 4096-bit key sizes
- Public key encryption: Encrypt sensitive data with public key
- Private key decryption: Decrypt encrypted data with private key
- Digital signing: Sign messages with private key
- Signature verification: Verify signature authenticity with public key
- Multiple hash algorithms: SHA-1, SHA-256, SHA-384, SHA-512
- Padding mode selection: Supports OAEP (recommended) and PKCS#1 v1.5 (legacy compatibility)
- Multiple formats: Input/output supports Text, Base64, Hex and more
Key Size Selection
Choosing the right key size is crucial for security and performance:
- 1024-bit: 1024-bit: Not recommended for new systems, may be cracked within years
- 2048-bit: 2048-bit: Currently recommended minimum, suitable for most applications
- 4096-bit: 4096-bit: Provides highest security, but slower encryption/decryption
Padding Mode
This tool supports two RSA padding modes. Choose based on security requirements and compatibility needs:
- OAEP: Optimal Asymmetric Encryption Padding, provides semantic security and protects against chosen ciphertext attacks. Recommended for new systems.
- PKCS#1 v1.5: Legacy padding mode with known Bleichenbacher attack vulnerability. Only recommended for compatibility with legacy systems.
Format Options
This tool supports multiple data formats for easy integration with different systems:
- Text: Direct UTF-8 text input/output, suitable for regular strings
- Base64: Base64 encoded format, commonly used for network transmission and binary data storage
- Hex: Hexadecimal format, convenient for viewing and debugging binary data
Use Cases
- Secure communication: Encrypt sensitive data before transmission
- Digital signatures: Verify message authenticity and integrity
- Key exchange: Securely exchange symmetric keys
- Identity authentication: Verify sender identity
- Software licensing: Generate and verify licenses
Security Recommendations
- Use at least 2048-bit key size
- Keep private keys secure, never transmit over insecure channels
- Rotate key pairs periodically
- Consider 4096-bit keys for highly sensitive data
- Use hybrid encryption (RSA + symmetric) for large data
RSA Limitations
- RSA can only encrypt limited data length (depends on key size and padding)
- RSA encryption/decryption is much slower than symmetric encryption
- Typically used to encrypt symmetric keys, not large data directly