Free · Private · Client-side
Encryption Key Generator
Generate cryptographically secure keys for AES encryption. Includes initialization vectors (IVs) for CBC and GCM modes.
Generated values never leave this device.In plain terms: a gaming PC guessing a million passwords per second would need 132,943,112,026,157,700,000,000,000,000,000,000 quintillion times the age of the universe. Even someone renting every cloud server on Earth — a trillion guesses per second — would need 132,943,112,026,157,700,000,000,000,000 quintillion times the age of the universe. Nobody is guessing this password; the only realistic risks are it being reused or phished.
Generated keys
Generated initialization vectors
Usage Example
const crypto = require('crypto');
const key = Buffer.from('...', 'hex');
const iv = Buffer.from('...', 'hex');
// Encrypt
const cipher = crypto.createCipheriv('aes-256-gcm', key, iv);
let encrypted = cipher.update('Hello, World!', 'utf8', 'hex');
encrypted += cipher.final('hex');
const authTag = cipher.getAuthTag();
// Decrypt
const decipher = crypto.createDecipheriv('aes-256-gcm', key, iv);
decipher.setAuthTag(authTag);
let decrypted = decipher.update(encrypted, 'hex', 'utf8');
decrypted += decipher.final('utf8');Understanding AES Encryption
AES Key Sizes Explained
AES-128
- Key: 128 bits (16 bytes)
- Rounds: 10
- Security: ~2^126 operations to break
- Use case: Fast, sufficient for most applications
AES-192
- Key: 192 bits (24 bytes)
- Rounds: 12
- Security: ~2^190 operations to break
- Use case: Intermediate security/performance
AES-256
- Key: 256 bits (32 bytes)
- Rounds: 14
- Security: ~2^254 operations to break
- Use case: Maximum security, government/financial
256-bit hex keys provide maximum security with 2^256 possible combinations. Even with quantum computers, AES-256 remains secure when properly implemented.
AES Encryption Modes
GCM (Galois/Counter Mode)
- ✓ Authenticated encryption (integrity + confidentiality)
- ✓ Parallel processing possible
- ✓ No padding required
- ✓ Industry standard for modern applications
IV size: 96 bits (12 bytes) recommended
CBC (Cipher Block Chaining)
- ✓ Widely supported and understood
- ⚠ Requires separate MAC for authentication
- ⚠ Sequential processing only
- ⚠ Padding oracle vulnerabilities possible
IV size: 128 bits (16 bytes) required
Format Comparison: Hex vs Base64
| Format | Character Set | Size Efficiency | Best For |
|---|---|---|---|
| Hexadecimal | 0-9, A-F (16 chars) | 2:1 expansion | URLs, databases, human-readable |
| Base64 | A-Z, a-z, 0-9, +, / (64 chars) | 4:3 expansion | JSON, XML, compact transmission |
Cryptographic Strength Analysis
Time to break AES with current technology:
- AES-128: ~2.9 × 10^32 years (longer than universe age)
- AES-256: ~3.3 × 10^56 years (incomprehensibly long)
- Quantum resistance: AES-256 provides ~128-bit post-quantum security
Real-world Applications
File Encryption
- • Disk encryption (BitLocker, FileVault)
- • Encrypted backups
- • Document protection
- • Archive encryption
Network Security
- • TLS/SSL connections
- • VPN tunnels
- • Database encryption
- • Message encryption
Bulk Generation
Generate in Terminal
For production systems, always generate encryption keys locally:
AES-256 key (hex)
openssl rand -hex 32AES-256 key (base64)
openssl rand -base64 32Initialization vector (IV)
openssl rand -hex 16Python secrets module
python3 -c "import secrets; print(secrets.token_hex(32))"Linux /dev/urandom
head -c 32 /dev/urandom | xxd -p -c 64For demonstration only
For production encryption, generate keys on your local machine or server using the terminal commands below. Never transmit encryption keys over the network.
IV and key management best practices
- Key storage: Use hardware security modules (HSMs) or key management services
- Key rotation: Rotate encryption keys regularly (every 90 days minimum)
- IV uniqueness: Never reuse an IV with the same key - this breaks semantic security
- IV generation: Use cryptographically secure random number generators
- Key derivation: Use PBKDF2, scrypt, or Argon2 when deriving keys from passwords