FACTOID # 12: Americans and Icelanders go to the cinema 5 times a year, on average. The average Japanese person goes only once.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

Encyclopedia > Blowfish encryption algorithm


Blowfish

The round function (Feistel function) of Blowfish
General
Designer(s) Bruce Schneier
First published 1993
Derived from -
Cipher(s) based on this design -
Algorithm detail
Block size(s) 64 bits
Key size(s) 32-448 bits in steps of 8 bits; default 128 bits
Structure Feistel network
Number of rounds 16
Best cryptanalysis
Four rounds can be broken using a second_order differential attack (Rijmen, 1997); for a class of weak keys, 14 rounds of Blowfish can be distinguished from a random permutation (Vaudenay, 1996).

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


Schneier designed Blowfish as a general-purpose algorithm, intended to replace the aging DES and free of the problems associated with other algorithms available at the time. Blowfish is not encumbered by patents (like Khufu, REDOC II, and IDEA), proprietary (as RC2 and RC4 are), or a government secret (as Skipjack was at the time).

Contents

The algorithm

Blowfish has a 64_bit block size and a key length of anywhere from 32 bits to 448 bits. It is a 16-round Feistel cipher and uses large key-dependent S-boxes. It is similar in structure to CAST-128, which uses fixed S-boxes.

Diagram of Blowfish

The diagram to the left shows the action of Blowfish. Each line represents 32 bits. The algorithm keeps two subkey arrays: the 18-entry P-array and four 256-entry S-boxes. The S-boxes accept 8-bit input and produce 32-bit output. One entry of the P-array is used every round, and after the final round, each half of the data block is XORed with one of the two remaining unused P-entries.

Diagram of Blowfish's F function

The diagram to the right shows Blowfish's F_function. The function splits the 32_bit input into four eight_bit quarters, and uses the quarters as input to the S_boxes. The outputs are added modulo 232 and XORed to produce the final 32_bit output.


Since Blowfish is a Feistel network, it can be inverted simply by XORing P17 and P18 to the ciphertext block, then using the P_entries in reverse order.


Blowfish's key schedule starts by initializing the P-array and S-boxes with values derived from the hexadecimal digits of pi, which contain no obvious pattern. The secret key is then XORed with the P_entries in order (cycling the key if necessary). A 64_bit all_zero block is then encrypted with the algorithm as it stands. The resultant ciphertext replaces P1 and P2. The ciphertext is then encrypted again with the new subkeys, and P3 and P4 are replaced by the new ciphertext. This continues, replacing the entire P_array and all the S_box entries. In all, the Blowfish encryption algorithm will run 521 times to generate all the subkeys _ about 4KB of data is processed.


Cryptanalysis of Blowfish

There is no effective cryptanalysis of Blowfish known publicly as of 2004, although the 64-bit block size is now considered too short, because encrypting more than 232 data blocks can begin to leak information about the plaintext. Despite this, Blowfish seems thus far to be secure, although specific implementations may not be. While the short block size does not pose any serious concerns for routine consumer applications like e_mail, Blowfish may not be suitable in situations where long_term security is a requirement, like data archival.


In 1996, Serge Vaudenay found a known-plaintext attack requiring 28r + 1 known plaintexts to break, where r is the number of rounds. Moreover, he also found a class of weak keys that can be detected and broken by the same attack with only 24r + 1 known plaintexts. This attack cannot be used against the full 16-round Blowfish; Vaudenay used a reduced-round variant of Blowfish. Vincent Rijmen, in his Ph.D. thesis, introduced a second-order differential attack that can break four rounds and no more. There remains no known way to break the full 16 rounds, apart from a brute-force search.


Blowfish in practice

Blowfish is one of the faster block ciphers in widespread use, except when changing keys. Each new key requires pre-processing equivalent to encrypting about 4 kilobytes of text, which is very slow compared to other block ciphers. This prevents its use in certain applications, but is not a problem in others. In one application, it is actually a benefit: the password-hashing method used in OpenBSD uses an algorithm derived from Blowfish that makes use of the slow key schedule; the idea is that the extra computational effort required gives protection against dictionary attacks.


In some implementations, Blowfish has a relatively large memory footprint of just over 4 kilobytes of RAM. This is not a problem even for older smaller desktop and laptop computers, but it does prevent use in the smallest embedded systems such as early smartcards.


Blowfish is not subject to any patents and is therefore freely available for anyone to use. This has contributed to its popularity in cryptographic software.


See also

References

  • V. Rijmen, "Cryptanalysis and design of iterated block ciphers", Doctoral dissertation , October 1997.
  • Bruce Schneier, Description of a New Variable-Length Key, 64-bit Block Cipher (Blowfish). Fast Software Encryption 1993: 191-204
  • Bruce Schneier, The Blowfish Encryption Algorithm -- One Year Later, Dr. Dobb's Journal, 20(9), p. 137, September 1995.
  • S. Vaudenay, "On the weak keys of Blowfish," Fast Software Encryption (FSE'96), LNCS 1039, D. Gollmann, Ed., Springer_Verlag, 1996, pp. 27__32.

External links


Block ciphers edit  (http://en.wikipedia.org/w/index.php?title=Template:Block_ciphers&action=edit)
Algorithms: 3-Way | AES | Akelarre | Blowfish | Camellia | CAST-128 | CAST_256 | CMEA | DEAL | DES | DES-X | FEAL | FROG | G-DES | GOST | Iraqi | KASUMI | KHAZAD | Khufu and Khafre | LOKI89/91 | LOKI97 | Lucifer | MacGuffin | Madryga | MAGENTA | MARS | MISTY1 | MMB | NewDES | RC2 | RC5 | RC6 | REDOC | Red Pike | S-1 | SAFER | SEED | Serpent | SHACAL | SHARK | Skipjack | Square | TEA | Triple DES | Twofish | XTEA
Design: Feistel network | Key schedule | Product cipher | S-box | SPN   Attacks: Brute force | Linear / Differential cryptanalysis | Mod n | XSL   Standardisation: AES process | CRYPTREC | NESSIE   Misc: Avalanche effect | Block size | IV | Key size | Modes of operation | Piling-up lemma | Weak key





  Results from FactBites:
 
Blowfish (449 words)
Blowfish was designed in 1993 by Bruce Schneier as a fast, free alternative to existing encryption algorithms.
Blowfish is unpatented and license-free, and is available free for all uses.
For Blowfish implementors, here are the hexadecimal digits of pi, arranged as four s_boxes and one p_array, as per the Blowfish default.
Blowfish (cipher) - Wikipedia, the free encyclopedia (894 words)
Schneier designed Blowfish as a general-purpose algorithm, intended as a replacement for the aging DES and free of the problems associated with other algorithms.
Blowfish has a 64-bit block size and a key length of anywhere from 32 bits to 448 bits.
Blowfish is one of the fastest block ciphers in widespread use, except when changing keys.
  More results at FactBites »

 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your location
Your comments
Please enter the 5-letter protection code


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.