💻 Coding

Text Encryption Tool

Encrypt or decrypt text and files with real AES-256 (GCM, CBC, CTR) and PBKDF2 passphrase stretching, computed 100% privately in your browser.

0 characters · 0 bytes 100% Client-Side WebCrypto
Passphrase strength: None PBKDF2 100,000 iterations

About the Text Encryption Tool

Quick Answer: The Text Encryption Tool provides real client-side cryptographic encryption using standard AES-256 (GCM, CBC, and CTR modes). Passphrases are hardened using PBKDF2 with 100,000 SHA-256 iterations and unique random salts and IVs for every encryption. Output is provided in single-string Base64, Hexadecimal, or JSON formats with zero server transmission.

Encryption is handled by the browser's native AES-256-GCM implementation, with your passphrase run through PBKDF2 at 100,000 iterations (SHA-256) and a fresh random salt and IV generated each time you encrypt, all without the text leaving the page. It's a solid convenience tool for everyday use, but for genuinely sensitive data you'd still want dedicated, audited security software instead.

Cryptographic Ciphers & Security Specifications

Cipher Algorithm Mode Type IV / Nonce Size Authenticated (AEAD) Key Derivation & Hardening
AES-256-GCM Galois/Counter Mode (NIST SP 800-38D) 96-bit (12-byte) unique IV Yes (Integrity + Authenticity) PBKDF2 (100,000 SHA-256 rounds)
AES-256-CBC Cipher Block Chaining (PKCS#7 Padding) 128-bit (16-byte) random IV No (Confidentiality only) PBKDF2 (100,000 SHA-256 rounds)
AES-256-CTR Counter Mode (Stream conversion) 128-bit (16-byte) counter No (Stream transformation) PBKDF2 (100,000 SHA-256 rounds)
WebCrypto API W3C Standard Browser Engine Hardware-accelerated C++ Yes (Native crypto.subtle) Zero server uploads, memory-only

Why your passphrase isn't used directly as the encryption key

AES-256 needs a 256-bit key with genuinely uniform randomness across all 256 bits, but a human-chosen passphrase, even a decent one, has far less real entropy than that and often follows predictable patterns. PBKDF2 (Password-Based Key Derivation Function 2) bridges that gap, it takes your passphrase and deliberately, repeatedly hashes it to stretch it into a properly-sized key, while also intentionally slowing the whole process down. That deliberate slowness is the entire point: it makes brute-force guessing dramatically more expensive for an attacker without meaningfully inconveniencing you, since you're only running it once per encryption or decryption.

Why specifically 100,000 iterations

Each PBKDF2 iteration means running SHA-256 once more on the accumulated result, and 100,000 of them takes a legitimate user only milliseconds on a normal device, an imperceptible one-time cost per operation. But an attacker trying to guess your passphrase has to pay that identical 100,000-iteration cost for every single guess they make, turning what might otherwise be millions of cheap guesses per second into a dramatically slower process. This "work factor" concept, deliberately expensive-but-tolerable computation, is the whole security value PBKDF2 adds on top of a weak or guessable passphrase.

Why a fresh salt is generated every single time you encrypt

The salt, 16 random bytes generated fresh for each encryption, gets mixed into the key derivation so that even the exact same passphrase produces a completely different derived key every time. Without this, an attacker could precompute a table of derived keys for common passphrases once and reuse it against any ciphertext they intercept, or notice that two messages encrypted with the same passphrase share telltale similarities. With a fresh salt every time, that precomputation attack becomes worthless, and encrypting identical text twice with the identical passphrase produces two completely unrelated-looking outputs.

Why the IV also has to be unique, even more strictly than the salt

AES-GCM has a hard security requirement: the same key and IV (initialization vector) combination must never be used to encrypt two different messages, doing so can catastrophically undermine the cipher's confidentiality guarantees. Since a fresh key is derived from a fresh salt on every encryption here anyway, generating a fresh random 12-byte IV alongside it (the standard size for GCM) ensures this critical constraint holds even in the unlikely event of a salt collision, defense in depth on a rule that genuinely cannot be violated safely.

Why salt, IV, and ciphertext are all bundled into one output string

Neither the salt nor the IV is secret, both need to be available again at decryption time to re-derive the identical key and re-run the cipher with the same parameters. Rather than requiring you to separately track and store three different values, this tool concatenates salt, then IV, then ciphertext into one byte sequence and base64-encodes the whole thing as a single portable string. That's why the encrypted result is just one block of text you can copy, paste, and store anywhere, decryption only needs that one string plus your passphrase, nothing else.

Why a wrong passphrase produces a clean error instead of garbled output

GCM is an authenticated encryption mode, meaning it bakes in an integrity check alongside the encryption itself. If you attempt to decrypt with the wrong passphrase, or if the ciphertext has been altered or corrupted in any way, that built-in authentication check fails and the browser's crypto engine throws an error rather than returning silently-corrupted plaintext. Since a wrong passphrase and genuinely corrupted data both trigger that exact same authentication failure with no way to distinguish between them, this tool's error message honestly reflects that ambiguity, "Wrong passphrase or corrupted data" rather than falsely claiming to know which one actually happened.

Authenticated Encryption with Associated Data (AEAD) Mechanics

Galois/Counter Mode (GCM) is an Authenticated Encryption with Associated Data (AEAD) operational mode for symmetric block ciphers. Unlike unauthenticated modes like CBC (Cipher Block Chaining) or CTR (Counter Mode), GCM couples confidentiality with cryptographic message integrity. During encryption, the cipher utilizes an underlying counter to generate a pseudo-random keystream that is XORed with the plaintext. Concurrently, a GHASH polynomial multiplication module processes both the ciphertext and any optional Associated Data across a Galois Field (GF(2^128)), computing a 128-bit authentication tag.

When decrypting, the engine recomputes the GHASH tag and performs a constant-time comparison against the tag embedded in the ciphertext payload. If a single bit in the ciphertext, salt, or initialization vector has been altered by a network glitch or a malicious man-in-the-middle attacker, the authentication verification aborts immediately. Plaintext bytes are wiped from memory without being exposed to higher-level application layers.

Side-Channel Defense: Constant-Time Execution in WebCrypto

Historically, web applications implementing client-side cryptography relied on third-party JavaScript libraries (such as CryptoJS or Forge). While functional, pure JavaScript cryptographic routines suffer from severe side-channel vulnerabilities. JavaScript runtime JIT compilers (like V8) optimize code execution paths dynamically, introducing variable execution times based on CPU branch prediction, memory cache misses, and S-box lookup table indexing.

Adversaries capable of executing unprivileged code or observing microsecond-level network response timings can exploit these timing variations to reconstruct private keys. The W3C Web Cryptography API (window.crypto.subtle) resolves this vulnerability by delegating all cryptographic operations directly to compiled C++ routines and dedicated CPU hardware extensions (such as Intel AES-NI, AMD Cryptographic Extensions, and ARMv8 Cryptography). Hardware instructions execute in strictly constant time, completely eliminating cache-timing and branch-timing side-channel leaks.

Quantum Computing Resilience: AES-256 and Grover's Algorithm

As quantum computing architectures advance, cybersecurity standards are evolving to counter theoretical quantum adversaries. While asymmetric cryptosystems (such as RSA and elliptic curve Diffie-Hellman) are fundamentally vulnerable to polynomial-time factorization via Shor's algorithm, symmetric ciphers exhibit far greater quantum resilience.

The primary quantum attack against symmetric algorithms is Grover's algorithm, an unstructured quantum search procedure that accelerates brute-force key retrieval by a quadratic factor: searching a key space of size 2^N requires 2^(N/2) operations. Consequently, AES-128 is reduced to an effective quantum security strength of 64 bits, placing it within theoretical reach of future fault-tolerant quantum hardware. In contrast, AES-256 is reduced from 256 bits to 128 bits of quantum security. Because 2^128 operations remains mathematically and energetically impossible to execute (exceeding the total thermodynamic capacity of planet Earth), AES-256 is officially rated by NIST and the NSA as post-quantum secure for classical confidentiality.

Zero-Trust Architecture: 100 Percent Client-Side Privacy

Text encryption is meaningless if the encryption engine transmits your plaintext or secret passphrase across the internet to a third-party server. Many online utilities send user text across HTTP APIs where server logs, database backups, and reverse proxies can harvest sensitive messages.

Utility369 enforces a strict zero-knowledge security boundary. All PBKDF2 key derivations, AES cipher transformations, and Base64 packaging execute entirely inside your local browser memory sandbox. No passphrases, keys, plaintexts, or ciphertexts are ever sent over external networks. You can disconnect your device from the internet, switch to airplane mode, and encrypt or decrypt data with complete mathematical privacy.

Frequently Asked Questions

Why isn't my passphrase used directly as the AES encryption key?

AES-256 needs a properly-sized 256-bit key with uniform randomness, which a human passphrase doesn't naturally have. PBKDF2 stretches your passphrase into a suitable key while deliberately slowing the process down, making brute-force guessing dramatically more expensive for an attacker.

Why does the tool use exactly 100,000 PBKDF2 iterations?

Each iteration adds negligible cost for a legitimate one-time encryption or decryption, but forces an attacker to pay that same cost on every single guess when trying to brute-force your passphrase, turning millions of cheap guesses per second into a dramatically slower process.

Why does encrypting the same text with the same passphrase produce different results each time?

A fresh random salt is generated for every encryption, which changes the derived key even when the passphrase is identical. This prevents precomputed attacks against common passphrases and means encrypting the same message twice produces two unrelated-looking outputs.

Why does the tool also generate a fresh IV every time?

AES-GCM has a strict requirement that the same key and IV combination must never encrypt two different messages, or the cipher's security guarantees can be undermined. Generating a fresh IV alongside the fresh salt ensures this requirement is respected on every encryption.

Why is everything bundled into one long base64 string instead of separate values?

The salt and IV aren't secret, but both are needed again at decryption to re-derive the identical key and cipher parameters. Bundling salt, IV, and ciphertext into one string means you only need to save and share a single block of text plus your passphrase to decrypt later.

Why does a wrong passphrase show a generic error instead of garbled text?

AES-GCM includes a built-in authentication check, so a wrong passphrase or corrupted ciphertext both trigger the same verification failure rather than producing readable-but-wrong output. Since the two causes are indistinguishable, the error message honestly reflects that ambiguity.

What is the difference between AES-GCM, AES-CBC, and AES-CTR modes?

AES-GCM is an authenticated mode providing confidentiality and integrity with Galois field authentication. AES-CBC is a legacy cipher block chaining mode requiring PKCS#7 padding vulnerable to padding oracle attacks. AES-CTR transforms the block cipher into a stream cipher via counter increments without authentication.

Can someone crack AES-256 using quantum computers?

Grover algorithm reduces the effective computational search space of symmetric ciphers by half, meaning AES-256 retains 128 bits of quantum security. This provides insurmountable protection against both classical GPU clusters and theoretical quantum adversaries.

Why does WebCrypto execute faster and safer than pure JavaScript crypto libraries?

The W3C WebCrypto API executes directly inside browser C++ engines and hardware cryptographic extensions (such as Intel AES-NI and ARMv8 Cryptography), providing constant-time execution that mitigates CPU timing and cache-based side-channel leaks.

Can lost passphrases be recovered by Utility369 or any administrator?

No. Because encryption runs entirely client-side using zero-knowledge architecture, no passphrases, keys, or ciphertexts are ever logged or sent to any server. If you lose your passphrase, encrypted data is mathematically unrecoverable.