Skip to content
uencoder
TASK

Encrypt data with the Twofish block cipher

Twofish is a 128-bit Feistel-network block cipher and AES competition finalist with keys up to 256 bits. Learn the encryption workflow and when to choose it over AES.

  1. 1

    Twofish operates on 128-bit blocks using a Feistel network with key-dependent S-boxes. Though not the AES winner, it remains a secure alternative with comparable strength. The operational steps — key generation, IV handling, padding — are identical to AES, so we demonstrate with AES-256 which shares the same block size and maximum key length.

  2. 2
    AES Encryptor →

    Encrypt your plaintext with AES-256 (same max key length as Twofish). Paste the plaintext, choose a 256-bit key, and produce ciphertext. The workflow mirrors Twofish exactly.

  3. 3
    AES Decryptor →

    Decrypt the ciphertext back to verify round-trip correctness. If the recovered plaintext matches the original, your key and IV handling are correct.

  4. 4

    When to prefer Twofish: you need a Feistel structure (easier to prove security bounds), are implementing on a platform where Twofish is already available, or have a regulatory requirement for algorithm diversity. In all other cases AES-256 is the default choice.

Frequently asked questions

Is Twofish still secure?
Yes. Twofish has withstood 20+ years of cryptanalysis with no practical attacks on the full cipher. It is slower than AES on most CPUs but offers comparable security guarantees.
Why did AES win over Twofish?
AES (Rijndael) was selected for its combination of security, performance, and simplicity. Twofish was considered secure but its key-dependent S-boxes made implementation more complex and slower on constrained hardware.

Workflows that solve this

Learn more

Want to understand why?

Related tools