Blowfish Encrypt/Decrypt

Encryption

Processed locally in your browser using the Web Crypto API. Nothing is sent to any server.

How It Works

This tool provides Blowfish encryption and decryption using the crypto-js library. All cryptographic operations happen locally in your browser — your key, IV, and data never leave your device.

⚠️ Security Warning: Blowfish's 64-bit blocks are vulnerable to the Sweet32 attack. Use AES-256 for real encryption. This tool is for decrypting old data and education only.

How It Works

  • Blowfish: A 16-round Feistel cipher by Bruce Schneier (1993) with a variable 32–448-bit key and 64-bit blocks.
  • CBC mode: Cipher Block Chaining uses an IV and chains blocks together — the right default.
  • ECB mode: Encrypts each block independently; leaks patterns. Only for compatibility with old data.
  • CFB / OFB / CTR: Streaming modes with no padding — exact-length output. CFB/OFB use 64-bit block feedback, CTR uses a counter.
  • Padding: PKCS7 (modern), Zero, ANSI X9.23, ISO 10126, or None (block-aligned input). Block modes only; encryption and decryption must match.
  • Character encodings: Decrypt output decodes as UTF-8, UTF-16LE, GBK, GB2312, GB18030, Big5, or Latin1 (ISO-8859-1) — legacy Chinese data is usually GBK. Encrypt side accepts UTF-8, UTF-16LE, or Latin1.
  • Output formats: Base64 (compact, common in old configs) or Hex (for code and analysis).

Encryption Formats

  • Standard: Explicit key (4–56 bytes) and IV. You control every parameter — best for custom implementations.
  • OpenSSL Compatible: Passphrase with random salt, matching openssl enc -bf-cbc. Ciphertext starts with "Salted__" (Base64: U2FsdGVkX1). Decryption auto-detects the key-derivation digest: legacy MD5 (OpenSSL ≤ 1.0.x) or modern SHA-256 (1.1.0+ / LibreSSL).

Blowfish vs AES

  • Blowfish: 64-bit blocks (Sweet32), unpatented and free — historically popular in bcrypt password hashing.
  • AES: 128-bit blocks, hardware-accelerated, the current worldwide standard.

Frequently Asked Questions

Is Blowfish encryption secure?

Not by modern standards. Blowfish uses 64-bit blocks, which makes it vulnerable to the Sweet32 birthday attack after roughly 32 GB of data under the same key. Bruce Schneier, its designer, recommends moving to his successor Twofish or to AES. Use this tool for legacy data and education, not for protecting new information.

What is Blowfish still used for?

Mostly for decrypting old data: legacy backups, older software and games that stored settings or save files with Blowfish, and some password managers and archivers from the 2000s. New systems should use AES-256 or ChaCha20.

What is the difference between CBC and ECB modes?

CBC (Cipher Block Chaining) uses an IV and chains each block with the previous one, so identical plaintext blocks produce different ciphertext. ECB encrypts each block independently and leaks patterns. Always prefer CBC unless a legacy system forces ECB.

What padding should I use?

PKCS7 is the modern default and unambiguously marks the end of the plaintext. Zero padding is common in old C implementations. ANSI X9.23 and ISO 10126 appear in specific legacy banking and financial systems. None means the plaintext is already a multiple of the 8-byte block size. Streaming modes (CFB/OFB/CTR) need no padding at all.

What key length does Blowfish need?

Blowfish accepts variable keys from 4 to 56 bytes (32–448 bits). Keys up to 448 bits were a selling point in 1993, when AES did not exist yet. Longer keys do not compensate for the 64-bit block weakness.

Can I decrypt ciphertext from other tools?

Yes. If the ciphertext starts with "U2FsdGVkX1" (Base64 for "Salted__"), it is OpenSSL format — select "OpenSSL Compatible", enter the passphrase, and the tool decrypts it, auto-detecting both legacy MD5 and modern SHA-256 key derivation. For non-OpenSSL ciphertext, select "Standard" and enter the exact key, IV, mode, and padding used for encryption.

Can it decrypt GBK-encoded Chinese data?

Yes. Legacy Chinese systems (older Java services, domestic software) usually stored text in GBK or GB18030 rather than UTF-8. Switch the Character Encoding selector on decrypt to GBK, GB2312, or GB18030 and the output decodes correctly. UTF-16LE (Windows software) is also supported. The encrypt side supports UTF-8, UTF-16LE, and Latin1 only — browsers cannot encode GBK, so paste the original bytes as hex if you need to reproduce GBK ciphertext.

Is my data sent anywhere?

No. All encryption and decryption happens locally in your browser using the crypto-js library. Your key, IV, and data never leave your device. This tool has no backend server — it is a pure client-side application.

Privacy Note

This tool runs entirely in your browser. Your input is never uploaded, stored, or sent to any server.

Disclaimer: This tool is provided for educational and informational purposes only. The results do not constitute professional security advice. Use at your own discretion.

More in Encryption