Twofish is an encryption algorithm based on an earlier algorithm, Blowfish, and was a finalist for a NIST Advanced Encryption Standard (AES) algorithm to replace the DES algorithm. (NIST eventually selected the Rijndael algorithm.)
Like Blowfish, Twofish uses block ciphering. Twofish uses a single key of any length up to 256 bits and is said to be efficient both for software that runs in smaller processors such as those in smart cards and for embedding in hardware. It allows implementers to trade off encryption speed, key setup time, and code size to balance performance. Designed by Bruce Schneier's Counterpane Systems, Twofish is unpatented, license-free, and freely available for use.