Feistel Networks, DES & Blowfish

The other half of block-cipher design space — the Feistel construction that makes decryption free, DES as the canonical key-length cautionary tale, and Blowfish, whose expensive key schedule became bcrypt.

Block ciphers come in two great architectural families: substitution–permutation networks (AES's family) and Feistel networks (DES's family). The Feistel construction solves an elegant problem — how to build an invertible cipher out of a non-invertible scrambling function — and its two most famous members teach the two most durable operational lessons in the field: key length is destiny (DES), and 64-bit blocks are now too small (both).

The Feistel construction #

Split the block into halves LL and RR. One round computes:

Li=Ri−1,Ri=Li−1⊕F(Ri−1,Ki)L_i = R_{i-1}, \qquad R_i = L_{i-1} \oplus F(R_{i-1}, K_i)

where FF is the round function and KiK_i the round subkey. Iterate 16 times, swap-free on the last round, done.

Provable backing came later: Luby and Rackoff (1988) showed that 3–4 Feistel rounds with a pseudorandom FF yield a pseudorandom permutation — the construction is sound in principle; everything rides on FF and the number of rounds.

DES: the canonical cautionary tale #

DES (1977) is a 16-round Feistel cipher on 64-bit blocks with a 56-bit key (64 bits minus 8 parity bits). The infamous initial/final permutations (IP/FP) at either end are cryptographically null — bit-shuffles with no key input, likely a 1970s hardware-layout convenience. The strength lives in FF: expand 32 bits to 48, XOR with the subkey, push through eight 6→4-bit S-boxes, permute.

Two historical facts carry the lessons:

  • The S-boxes were tuned against an attack the public didn't know existed. When Biham and Shamir published differential cryptanalysis in 1990, DES turned out to be strangely resistant. Coppersmith confirmed in 1994 that IBM and NSA knew the technique in 1974 and shaped the S-boxes against it, keeping the criteria secret. Design rationale you cannot audit is a Kerckhoffs problem even when the designers are honest.
  • The key was sized to fail. NSA negotiated the key down from Lucifer's 128 bits to 56. The keyspace (256≈7.2×10162^{56} \approx 7.2 \times 10^{16}) fell to organized brute force on schedule:
  1. 1977 Diffie & Hellman estimate a $20M machine could break DES daily; dismissed as alarmist.
  2. 1998 EFF builds Deep Crack for ~$250k; finds a key in 56 hours.
  3. 1999 Deep Crack + distributed.net: 22 hours 15 minutes.
  4. 2012+ Commodity FPGA rigs and cloud GPU services crack DES keys in hours for a few thousand dollars.

3DES (EDE: encrypt–decrypt–encrypt with 2–3 keys) patched the key length to 112 effective bits (meet-in-the-middle caps it below the naive 168), but kept the 64-bit block — see the Sweet32 box below. NIST fully disallowed 3DES for encryption after 2023 (SP 800-131A Rev. 2); it survives only in legacy payment hardware.

Blowfish: Feistel with a deliberately expensive key schedule #

Blowfish (Schneier, 1994) was a free, unpatented DES replacement candidate: 16-round Feistel, 64-bit block, key from 32 to 448 bits. Its round function uses four key-dependent 8→32-bit S-boxes:

F(x)=((S1[x1]+S2[x2] mod 232)⊕S3[x3])+S4[x4] mod 232F(x) = \big((S_1[x_1] + S_2[x_2] \bmod 2^{32}) \oplus S_3[x_3]\big) + S_4[x_4] \bmod 2^{32}

The interesting part is the key schedule. The 18 subkeys and 4×256 S-box entries (4168 bytes of state) are initialized with the hex digits of π\pi (nothing-up-my-sleeve numbers), XORed with the key, then overwritten by running Blowfish on itself 521 times. Key setup costs as much as encrypting ~4 KB — irrelevant for bulk encryption, ruinous for brute force.

Schneier himself has told users to move on ("I'm amazed it's still being used"): Twofish was its 128-bit-block successor, and today the answer is AES or ChaCha20.

Where Feistel designs still live #

Design Type Status
DES / 3DES balanced Feistel retired; legacy payment HSMs only
Blowfish balanced Feistel, keyed S-boxes legacy; survives as bcrypt's core
Twofish, Camellia, GOST/Kuznyechik-era designs Feistel variants secure but niche; Camellia in some TLS stacks
FF1 / FF3-1 format-preserving encryption unbalanced Feistel over decimal digits current NIST SP 800-38G — encrypting card numbers into valid-looking card numbers
Lightweight ciphers (SIMON, SPECK) Feistel-like ARX constrained hardware

The construction is alive; the 64-bit-block instances are not.

Source claims audit #

Seeded from a university lab manual (DES and Blowfish labs, following Applied Cryptography). Status of its load-bearing claims:

Claim from source Status Notes
Feistel iteration equations, 16 rounds, inverse = reversed subkeys current Core construction, unchanged
DES full permutation/S-box tables as study material current but reference data Mechanically correct; memorizing tables teaches nothing — the S-box design criteria are the story
"DES key is 64-bit" framing outdated 56 effective bits; the 8 parity bits were part of why it fell
DES presented as a live cipher to learn for practice outdated Brute-forced since 1998; NIST-withdrawn 2005; 3DES disallowed after 2023
Blowfish structure, FF, π-based key schedule, 32–448-bit key current Verified directly against Applied Cryptography ch. 14.3: 4168 bytes of subkeys, 521 iterations of key expansion, 18-entry P-array, four 256-entry S-boxes, 26 clocks/byte on 32-bit CPUs
"~150 products encrypt with Blowfish" (via schneier.com) outdated 1990s snapshot; modern relevance is bcrypt lineage plus legacy installs
Blowfish motivation: IDEA/REDOC patents, GOST's unpublished S-boxes, secret Skipjack current as history Good Kerckhoffs material; patents since expired
Source omits any block-size discussion — Added: Sweet32 makes 64-bit blocks the operative flaw today

Sources

  1. bookApplied Cryptography, 2nd ed. (Schneier)
  2. paperDescription of a New Variable-Length Key, 64-Bit Block Cipher (Blowfish) (Schneier, 1994)
  3. articleSweet32: Birthday attacks on 64-bit block ciphers (Bhargavan & Leurent, 2016)
  4. docsNIST SP 800-131A Rev. 2 — Transitioning the Use of Cryptographic Algorithms

Searches titles, aliases, headings, summaries, and full text.↑↓ move ↵ open esc close