All Topics  
Twofish

 

   Email Print
   Bookmark   Link






 

Twofish



 
 
In cryptography
Cryptography

Cryptography is the practice and study of hiding information. In modern times cryptography is considered a branch of both mathematics and computer science and is affiliated closely with information theory, computer security and engineering....
, Twofish is a symmetric key
Symmetric-key algorithm

Symmetric-key algorithms are a class of algorithms for cryptography that use trivially related, often identical, cryptographic keys for both decryption and encryption....
 block cipher
Block cipher

In cryptography, a block cipher is a symmetric key algorithm cipher which operates on fixed-length groups of bits, termed blocks, with an unvarying transformation....
 with a block size
Block size (cryptography)

In modern cryptography, symmetric key algorithm ciphers are generally divided into stream ciphers and block ciphers. Block ciphers operate on a fixed length string of bits....
 of 128 bit
Bit

A bit is a binary numeral system numerical digit, taking a value of either 0 or 1. Binary digits are a basic unit of information Computer data storage and transmission in digital computing and digital information theory....
s and key size
Key size

In cryptography, key size or key length is the size of the key used in a cryptographic algorithm . An algorithm's key length is distinct from its cryptographic security, which is a logarithmic measure of the fastest known computational attack on the algorithm, also measured in bits....
s up to 256 bits. It was one of the five finalists of the Advanced Encryption Standard contest
Advanced Encryption Standard process

The Advanced Encryption Standard , the block cipher ratified as a standard by National Institute of Standards and Technology of the United States , was chosen using a process markedly more open and transparent than its predecessor, the aging Data Encryption Standard ....
, but was not selected for standardisation. Twofish is related to the earlier block cipher Blowfish
Blowfish (cipher)

In cryptography, Blowfish is a key ed, symmetric key algorithm block cipher, designed in 1993 by Bruce Schneier and included in a large number of cipher suites and encryption products....
.

Twofish's distinctive features are the use of pre-computed key-dependent S-box
Substitution box

In cryptography, an S-box is a basic component of symmetric key algorithms which performs substitution. In block ciphers, they are typically used to obscure the relationship between the Key and the ciphertext — Claude Shannon property of confusion and diffusion....
es, and a relatively complex key schedule
Key schedule

In cryptography, the so-called product ciphers are a certain kind of ciphers, where the ciphering of data is done in "rounds". The general setup of each round is the same, except for some hard-coded parameters and a part of the key , called a subkey....
. 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).






Discussion
Ask a question about 'Twofish'
Start a new discussion about 'Twofish'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In cryptography
Cryptography

Cryptography is the practice and study of hiding information. In modern times cryptography is considered a branch of both mathematics and computer science and is affiliated closely with information theory, computer security and engineering....
, Twofish is a symmetric key
Symmetric-key algorithm

Symmetric-key algorithms are a class of algorithms for cryptography that use trivially related, often identical, cryptographic keys for both decryption and encryption....
 block cipher
Block cipher

In cryptography, a block cipher is a symmetric key algorithm cipher which operates on fixed-length groups of bits, termed blocks, with an unvarying transformation....
 with a block size
Block size (cryptography)

In modern cryptography, symmetric key algorithm ciphers are generally divided into stream ciphers and block ciphers. Block ciphers operate on a fixed length string of bits....
 of 128 bit
Bit

A bit is a binary numeral system numerical digit, taking a value of either 0 or 1. Binary digits are a basic unit of information Computer data storage and transmission in digital computing and digital information theory....
s and key size
Key size

In cryptography, key size or key length is the size of the key used in a cryptographic algorithm . An algorithm's key length is distinct from its cryptographic security, which is a logarithmic measure of the fastest known computational attack on the algorithm, also measured in bits....
s up to 256 bits. It was one of the five finalists of the Advanced Encryption Standard contest
Advanced Encryption Standard process

The Advanced Encryption Standard , the block cipher ratified as a standard by National Institute of Standards and Technology of the United States , was chosen using a process markedly more open and transparent than its predecessor, the aging Data Encryption Standard ....
, but was not selected for standardisation. Twofish is related to the earlier block cipher Blowfish
Blowfish (cipher)

In cryptography, Blowfish is a key ed, symmetric key algorithm block cipher, designed in 1993 by Bruce Schneier and included in a large number of cipher suites and encryption products....
.

Twofish's distinctive features are the use of pre-computed key-dependent S-box
Substitution box

In cryptography, an S-box is a basic component of symmetric key algorithms which performs substitution. In block ciphers, they are typically used to obscure the relationship between the Key and the ciphertext — Claude Shannon property of confusion and diffusion....
es, and a relatively complex key schedule
Key schedule

In cryptography, the so-called product ciphers are a certain kind of ciphers, where the ciphering of data is done in "rounds". The general setup of each round is the same, except for some hard-coded parameters and a part of the key , called a subkey....
. 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
Pseudo-Hadamard transform

The pseudo-Hadamard transform is a reversible transformation of a bit string that provides diffusion . See Hadamard transform.The bit string must be of even length, so it can be split into two bit strings a and b of equal lengths, each of n bits....
 (PHT) from the SAFER
SAFER

In cryptography, SAFER is the name of a family of block ciphers designed primarily by James Massey on behalf of Cylink Corporation. The early SAFER K and SAFER SK designs share the same encryption function, but differ in the number of rounds and the key schedule....
 family of ciphers. Twofish uses the same Feistel structure as DES
Data Encryption Standard

The Data Encryption Standard is a block cipher that was selected by National Bureau of Standards as an official Federal Information Processing Standard for the United States in 1976 and which has subsequently enjoyed widespread use internationally....
.

On most software platforms Twofish is slightly slower than Rijndael (the chosen algorithm for Advanced Encryption Standard
Advanced Encryption Standard

In cryptography, the Advanced Encryption Standard is an encryption standard adopted by the Federal government of the United States. The standard comprises three block ciphers, AES-128, AES-192 and AES-256, adopted from a larger collection originally published as Rijndael. Each AES cipher has a 128 bit block size, with key sizes of 128...
) for 128-bit key
Key (cryptography)

In cryptography, a key is a piece of information that determines the functional output of a cryptographic algorithm or cipher. Without a key, the algorithm would have no result....
s, but somewhat faster for 256-bit keys.

Twofish was designed by Bruce Schneier
Bruce Schneier

Bruce Schneier is an American cryptographer, computer security specialist, and writer. He is the author of several books on computer security and cryptography, and is the founder and chief technology officer of BT Counterpane, formerly Counterpane Internet Security, Inc....
, John Kelsey
John Kelsey (cryptanalyst)

John Kelsey is a cryptographer currently working at NIST. His research interests include cryptanalysis and design of symmetric cryptography primitives , analysis and design of cryptographic protocols, CSPRNG, electronic voting, side-channel attacks on cryptography implementations, and anonymizing communications systems....
, Doug Whiting, David Wagner
David Wagner

David A. Wagner is an Associate Professor of Computer Science at the University of California, Berkeley and a well-known researcher in cryptography and computer security....
, Chris Hall
Chris Hall (cryptographer)

Christopher Hall is an United States cryptographer and mathematician. He is one of the creators of the cryptosystem Twofish. He obtained a Doctor of Philosophy in Mathematics from Princeton University in 2003, under Nick Katz....
, and Niels Ferguson
Niels Ferguson

Niels Ferguson is a Netherlands cryptography engineer and consultant who currently works for Microsoft. He has worked with others, including Bruce Schneier, designing cryptographic algorithms, testing algorithms and protocols, and writing papers and books....
; the "extended Twofish team" who met to perform further cryptanalysis of Twofish and other AES contest entrants included Stefan Lucks
Stefan Lucks

Stefan Lucks is a researcher in the fields of communications security and cryptography. Lucks is known for his attack on Triple DES, and for extending Lars Knudsen's Square attack to Twofish, a cipher outside the Square family, thus generalising the attack into integral cryptanalysis....
, Tadayoshi Kohno, and Mike Stay.

The Twofish cipher has not been patent
Patent

A patent is a set of exclusive rights granted by a state to an inventor or his assignee for a term of patent in exchange for a disclosure of an invention....
ed and the reference implementation has been placed in the public domain
Public domain

File:PD-icon.svgThe public domain is a range of abstract materials?commonly referred to as intellectual property?which are not owned or controlled by anyone....
. As a result, the Twofish algorithm is free for anyone to use without any restrictions whatsoever. However, Twofish has seen less widespread usage than Blowfish
Blowfish (cipher)

In cryptography, Blowfish is a key ed, symmetric key algorithm block cipher, designed in 1993 by Bruce Schneier and included in a large number of cipher suites and encryption products....
, which has been available for a longer period of time.

Cryptanalysis

As of 2008, the best published cryptanalysis on the Twofish block cipher is a truncated differential cryptanalysis
Truncated differential cryptanalysis

In cryptography, truncated differential cryptanalysis is a generalization of differential cryptanalysis, an attack against block ciphers. Lars Knudsen developed the technique in 1994....
 of the full 16-round version. The paper claims that the probability of truncated differentials is 2-57.3 per block and that it will take roughly 251 chosen plaintexts (32 PiB
PIB

PIB, pib or PiB may stand for *Hattiesburg-Laurel Regional Airport *Produit Int?rieur Brut , Producto Interno Bruto , Produto Interno Bruto or Produsul Intern Brut for gross domestic product...
 worth of data) to find a good pair of truncated differentials.

Bruce Schneier responds in a 2005 blog entry that this paper does not present a full cryptanalytic attack, but only some hypothesized differential characteristics: "But even from a theoretical perspective, Twofish isn't even remotely broken. There have been no extensions to these results since they were published in 2000."

See also

  • Advanced Encryption Standard
    Advanced Encryption Standard

    In cryptography, the Advanced Encryption Standard is an encryption standard adopted by the Federal government of the United States. The standard comprises three block ciphers, AES-128, AES-192 and AES-256, adopted from a larger collection originally published as Rijndael. Each AES cipher has a 128 bit block size, with key sizes of 128...
  • Data Encryption Standard
    Data Encryption Standard

    The Data Encryption Standard is a block cipher that was selected by National Bureau of Standards as an official Federal Information Processing Standard for the United States in 1976 and which has subsequently enjoyed widespread use internationally....


External links

  • with full specifications, free source code, and other Twofish resources.
  • — Wagner was one of the designers of Twofish.
  • List of products using TwoFish