In cryptography, Twofish is a symmetric key block cipher with a block size of 128 bits and key sizes up to 256 bits. It was one of the five finalists of the Advanced Encryption Standard contest, but it was not selected for standardization. Twofish is related to the earlier block cipher Blowfish.
Twofish's distinctive features are the use of pre-computed key-dependent S-boxes, and a relatively complex key schedule. One half of an n-bit key is used as the actual encryption key and the other half of the n-bit key is used to modify the encryption algorithm (key-dependent S-boxes). Twofish borrows some elements from other designs; for example, the pseudo-Hadamard transform (PHT) from the SAFER family of ciphers. Twofish has a Feistel structure like DES.
On most software platforms Twofish was slightly slower than Rijndael (the chosen algorithm for Advanced Encryption Standard) for 128-bit keys, but it is somewhat faster for 256-bit keys.
Twofish was designed by Bruce Schneier, John Kelsey, Doug Whiting, David Wagner, Chris Hall, and Niels Ferguson; the "extended Twofish team" who met to perform further cryptanalysis of Twofish and other AES contest entrants included Stefan Lucks, Tadayoshi Kohno, and Mike Stay.
Sarangi geureohji eogim eobshi geureohji dashi nal tteonaryeo hajyo
Ibyeori geureohji eogim eobshi geureohji sarangeul deryeo ganeyo
Wae nal tteonaryeo hajyo geudae mameural su eobseo
Babo cheoreom gireureun aicheoreom chamateon nun mulmani heureune
Hwajangeul dashi gochyeodo nae nunmullo beonjigo maljyo
Eollukjin moseubi shilheo geudae eolgul boji mothaejyo
Ulgineun shilheunde majimak nae moseup monaji anhke
Ugo shipeunde geureoji mothae mianhae
Jeongmal joha neunde neol tteonalsu isseulkka ajik neol sarang haneunde
Angamyeon andwenayo jeongmal ireogin shilheunde
Babo cheoreom ttesseuneun ai cheoreom chamateon nunmul mani heureune
Hwajangeul dashi gochyeodo nae nunmullo beonjigo maljyo
Eollukjin moseubi shilheo geudae eolgul boji mothaejyo
Ulgineun shilheunde majimak nae moseup monaji anhke
Ugo shipeunde geureoji mothae mianhae
Maeil jeonhwa haeseo nal chaeng gyeojugo
Appa cheoreom gamssajun geudae yeojyo
Ijeneun andwe gejyo nae ilbuteo urin namil tende
Moreun cheokha myeo geureohke saraya gejyo
Ibsureul magabo ado nae ibsullo saeyeona ojyo
Gajima ihan madiga jakku jakku saeyeona ojyo
Bujapgi shilheunde tteonaneun bal georeum eoryeopji anhke
Uneun eolgullo bonaeji mothae mianhae