AES-GCM Text Encryption & Decryption
Encrypt and decrypt sensitive strings directly inside your browser. Employs AES-GCM authenticated cipher with 100,000 PBKDF2 rounds for robust defense against brute-force attacks.
Understanding AES-GCM Authenticated Encryption & Security Principles
Why Galois/Counter Mode (GCM) Over Legacy CBC Mode?
Traditional block cipher modes like AES-CBC (Cipher Block Chaining) only provide confidentiality. Without a separate Message Authentication Code (HMAC), CBC is vulnerable to padding oracle attacks (such as POODLE and Lucky Thirteen), allowing attackers to recover plaintext by manipulating padding bytes.
AES-GCM is an AEAD (Authenticated Encryption with Associated Data) scheme. It calculates a 128-bit authentication tag simultaneously with encryption. If any bit of the ciphertext or IV is tampered with in transit, decryption immediately aborts with an authentication failure.
The Crucial Role of Salt and IV (Initialization Vector)
When encrypting with a human-chosen password, an attacker can precompute dictionary hashes unless salt is used.
- PBKDF2 Salt (16 bytes): Randomly generated per encryption to ensure two identical passwords produce completely different encryption keys.
- IV (12 bytes / 96 bits): Must never be reused with the same key. In GCM mode, reusing an IV destroys authentication guarantees and leaks plaintext XOR differences. This tool generates fresh cryptographically random salts and IVs for every payload.