Encryption and Decryption

This page provides a developer-friendly playground for encrypting and decrypting data using both symmetric (AES) and asymmetric (RSA) cryptographic algorithms.

  • Symmetric encryption (AES) allows encrypting data with a shared secret password, offering fast and secure encryption for general purposes.
  • Asymmetric encryption (RSA-OAEP) enables secure data exchange using a public/private keypair, ideal for scenarios where secret sharing is not practical.

Features:

  • Choose between Encrypt and Decrypt operations
  • Select Symmetric (AES) or Asymmetric (RSA-OAEP) modes
  • Support for multiple AES algorithms and key sizes
  • Auto-generate secure random Initialization Vectors (IVs) for AES
  • Auto-generate secure RSA keypairs for RSA usage
  • Output encoding in Hex or Base64
  • All operations are fully client-side — nothing leaves your browser

Private and Secure: Fully client-side — nothing leaves your browser!


Input / Output
Options








Supported Modes and Algorithms

ModeAlgorithmDescriptionRecommendation
Symmetric (AES)AES-128-CBCClassic AES encryption with 128-bit key and CBC mode (requires IV and padding)Recommended for general use
Symmetric (AES)AES-192-CBCAES encryption with 192-bit key and CBC mode (rarely used)Optional (advanced only); less common
Symmetric (AES)AES-256-CBCAES encryption with 256-bit key and CBC modeStronger security if needed
Symmetric (AES)AES-256-GCMModern AES encryption with 256-bit key and Galois/Counter Mode (authenticated encryption)Best for production
Asymmetric (RSA)RSA-OAEPRSA encryption with Optimal Asymmetric Encryption PaddingRecommended for public key encryption

Notes:

  • AES-GCM is preferred for modern applications because it provides confidentiality and integrity in one operation (authenticated encryption).
  • AES-CBC remains useful for file encryption, legacy systems, and simpler symmetric use cases but must be combined with a secure random IV.
  • RSA-OAEP ensures robust encryption security and protects against chosen-ciphertext attacks; it is the standard for RSA encryption today.
  • AES-192-CBC is supported but rarely needed; most systems choose between 128-bit and 256-bit keys directly.

AES-256 for Data-at-Rest: Practical Usage and Modern Best Practices

AspectCBC ModeGCM Mode
Real-world usageHistorically common (especially in disk encryption, file systems)Increasingly preferred for new systems and services
Padding requiredYes (PKCS#7 padding)No padding needed
Provides data integrity (authenticated encryption)No (requires manual HMAC)Yes (built-in authentication)
Recommended today for new systems?Sometimes (with MAC)Strongly recommended
Susceptible to IV reuse issuesYes (causes prefix leaks)Yes (but also breaks integrity if reused)
Ease of implementationModerate (must manage MACs separately)Easier (encrypt and authenticate in one step)

Real-World Usage Examples

System / ServiceAES Mode UsedNotes
Early Microsoft BitLocker (Vista/Win7)AES-128/256-CBC (with external MAC)Historical CBC usage in early full disk encryption
Modern BitLocker (Win10/Win11)AES-256-XTSXTS is a special secure disk mode derived from CBC
AWS S3 (KMS managed keys)AES-256-GCMAuthenticated encryption preferred for object storage
Google Cloud StorageAES-256-CBC (internal)Plus additional integrity protections around the encrypted blob
Linux dm-crypt / LUKS2AES-256-XTSDefault for modern Linux disk encryption

Notes:

  • AES-GCM is the best option for encrypting sensitive data at rest because it ensures confidentiality and integrity together.
  • If using AES-CBC, you must combine it with an authenticated hash (like HMAC-SHA-256) to avoid silent corruption risks.
  • For large files or disk encryption, AES-XTS is often used instead of pure CBC.