NEW
An AES finalist block cipher with 128-bit blocks, flexible key sizes up to 256 bits, and complex key-dependent S-boxes.
DESCRIPTION
Twofish is a symmetric block cipher designed by Schneier et al. as an AES candidate, succeeding Blowfish conceptually. It uses a Feistel-like structure, key-dependent S-boxes, MDS matrices, and whitening for strong diffusion and nonlinearity. Twofish offers competitive performance and flexible key sizes. Although AES was selected, Twofish remains well-regarded and implemented in various libraries. Its design influenced later cipher research and practice.
ALTERNATIVE DEFINITIONS
Bruce Schneier
Twofish is a 128-bit block cipher, with keys up to 256 bits, designed as an AES candidate by a team led by Bruce Schneier.
Highlights block size, key length, and AES candidacy from the authors’ materials.
NIST
Twofish was one of the five AES finalists evaluated by NIST for the Advanced Encryption Standard.
Places Twofish within the formal AES competition process.
RELATED TERMS
Blowfish Feistel Function Key-Dependent S-Boxes Whitening MDS Matrix Subkey Generation Rijndael Serpent MARS
COMPETING TERMS
KNOWLEDGE AREAS
Data Security Software Engineering
TARGET AUDIENCE
Security Architect Cybersecurity Engineer Software Developer
EXTERNAL SOURCES
- Wikipedia - Twofish
- Bruce Schneier - Official Twofish papers and FAQ
- NIST - NIST AES competition overview
TOP QUESTIONS
How does Twofish differ from Blowfish?
Twofish improves on Blowfish with 128-bit blocks, key-dependent S-boxes, whitening layers, and modern diffusion via MDS matrices.
Category: Comparison
Why wasn’t Twofish selected as AES?
Rijndael was chosen for its performance, simplicity, and security balance. Twofish remained a strong, respected finalist.
Category: History
Where is Twofish used today?
It appears in open-source libraries and some applications, though AES dominates mainstream protocols and standards.
Category: Usage
What are Twofish’s key sizes?
It supports keys up to 256 bits, commonly 128, 192, or 256 bits, aligning with AES key sizes.
Category: Definition
What is key-dependent S-boxing in Twofish?
S-boxes are derived from the key, adding nonlinearity tailored per key to hinder precomputation attacks.
Category: Concept
Is Twofish faster than AES?
Performance varies by platform; AES often wins due to widespread hardware acceleration. Twofish can be competitive in software-only contexts.
Category: Performance
Does Twofish support authenticated encryption?
Twofish is a block cipher; AEAD requires composition with suitable modes, similar to AES.
Category: Usage
Is Twofish standardized?
Not as a FIPS like AES, but it has open specifications and implementations available.
Category: Opinion
What are common mistakes when using Twofish?
Using insecure modes, poor key management, or reusing nonces (in AEAD constructions) undermines security, as with any block cipher.
Category: Mistakes