AES versleutelen en ontsleutelen
Please read before use
• This tool runs entirely in your browser. No plaintext, ciphertext, or key is sent to a server.
• It is intended for development, debugging, learning and self-managed scenarios. Do not use this page as the only protection for production secrets, customer data, or anything that requires auditing.
• For real applications: use audited libraries (libsodium, OpenSSL, AWS Encryption SDK), a real KDF (Argon2id ≥ 1 iteration / 64 MiB), AEAD modes only, and manage keys on the server with proper access control.
UTF-8-tekst
Mode comparison — GCM vs CBC vs CTR▼
| Mode | Authentication | IV requirement | Performance | Recommended use |
|---|---|---|---|---|
| AES-GCM | Yes (AEAD, 128-bit tag) | 12 bytes (recommended); never reuse with same key | Fast, hardware-accelerated | Default — modern API, file encryption, anything authenticated |
| AES-CBC | No — must add HMAC/MAC | 16 bytes; unpredictable (CSPRNG) and never reuse | Fast, hardware-accelerated | Legacy TLS, disk encryption (XTS-AES), never use raw for new designs |
| AES-CTR | No — must add HMAC/MAC | 16 bytes; never reuse with same key (catastrophic if reused) | Fastest, parallelizable | Random-access streams, disk encryption, but combine with MAC |
Reading the table
- • AES-GCM is the only AEAD among the three — it both encrypts and authenticates in one step. If you don't know which to choose, choose GCM.
- • CBC and CTR only provide confidentiality. They need a separate MAC (HMAC-SHA256, compute-then-MAC) or they are vulnerable to chosen-ciphertext and bit-flipping attacks.
- • Both IV and nonce must be unique per (key, message). GCM with a reused IV leaks the authentication key — treat as catastrophic.
Notities over modi en formaten
- • Browser-SubtleCrypto biedt voor AES alleen GCM, CBC en CTR — niet ECB, CFB of OFB (om zwak gebruik te voorkomen). Voor andere modi gebruik je OpenSSL of een serverbibliotheek.
- • Cijfertekst-formaat naar keuze: Hex / Base64 / Base64URL, compatibel met CyberChef, API's, JWT enz. Beide zijden (versleuteling en ontsleuteling) moeten hetzelfde formaat gebruiken.
- • Onder AES-GCM is de uitvoer een doorlopende byte-stroom van «cijfertekst + authenticatielabel»; de tool codeert het hele blok in het gekozen formaat — plak het hele blok bij ontsleuteling.
Notities
- • Web Crypto draait volledig in de browser; GCM is geverifieerde versleuteling, geschikt voor standaardscenario's.
- • Bij versleuteling kan IV leeg blijven — de tool genereert een willekeurige IV en vult deze hierboven in, voor hergebruik bij ontsleuteling.
- • Bij ontsleuteling IV leeg laten = nulvector proberen (alleen geldig als de andere partij dezelfde conventie gebruikt).
Gratis online tool voor AES versleutelen en ontsleutelen met AES-CBC, AES-GCM en AES-CTR. Ondersteunt AES-128/192/256-sleutels, ciphertext-formaten Hex/Base64/Base64URL, PBKDF2-SHA256-sleutelafleiding op basis van wachtwoorden, willekeurige IV/salt-generatie en Web Crypto-verwerking volledig in de browser.