Skip to content
CoreSource checked

Feistel Network

Builds an invertible block cipher structure from repeated round functions.

Quick Facts

Compact metadata for implementation and discovery.

Category
Cryptography
Difficulty
Intermediate
Family
Block Cipher Structure
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
2
Code example
Ready
Visualization
Ready

Overview

A Feistel network splits a block into halves, transforms one half with a keyed round function, and swaps halves so decryption can reverse the same structure.

Core Concepts

round functionleft-right splitxor mixinginvertible structuremisuse resistanceparameter validation

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(rounds)

Average

O(rounds)

Worst

O(rounds)

Space

O(1)

When to Use

  • Use when protecting messages needs round function.
  • Use when the input matches the assumptions behind block Cipher Structure.

When Not to Use

  • Avoid when a well-reviewed library already provides the primitive for production use.
  • Avoid when a simpler algorithm gives the required result with less setup.

What It Does

  • Builds an invertible block cipher structure from repeated round functions
  • Uses round function and left-right split to guide the work.
  • Produces ciphertext, digest, proof, or derived key.

Use Cases

  • Protecting messages
  • Authenticating data
  • Deriving or managing cryptographic material

Inputs

  • Secret key or public parameters
  • Message or secret data
  • Nonce, salt, or context where needed

Outputs

  • Ciphertext, digest, proof, or derived key

Key Formulas (1)

Feistel round

Lnext = R, Rnext = L xor F(R, keyi)
L_next = R, R_next = L xor F(R, key_i)

Updates the two halves during one encryption round.

Pseudocode

  1. 1.Validate keys, nonces, salts, group parameters, and input ranges
  2. 2.Apply the primitive's block, hash, group, or reduction operation
  3. 3.Combine intermediate values exactly as the construction specifies
  4. 4.Return the protected value, proof, signature, derived key, or verification result

Canonical Example

Input
message = 'pay 10' with configured keys, nonces, or public parameters
Output
Ciphertext, digest, proof, or derived key
Explanation
Feistel Network applies round function to produce ciphertext, digest, proof, or derived key.

Implementation Notes

  • Use constant-time library implementations for real systems instead of hand-written primitives.
  • Keep the round function step separate enough to test independently.
  • Use reviewed libraries and protocol specifications for production security-sensitive code.

Common Pitfalls

  • Reusing nonces, salts, pads, or domain parameters can destroy the intended security property.
  • Test edge cases, not only clean examples.
  • Treating educational pseudocode as production crypto can hide nonce, parameter, and side-channel requirements.

Interactive Mechanism Walkthrough

Graph Frontier & Edge Relaxation

Show the major cryptographic rounds or data dependencies without exposing secrets.

Feistel Network mechanism walkthrough step 1 of 4suvwxt
Step 1 of 4: Validate keys, nonces, salts, group parameters, and input ranges
cryptography-mechanism

Notes

A Feistel network is a cipher construction pattern; security depends on the round function, key schedule, and number of rounds.

Sources (1)

What each reference supports for this entry.

Handbook of Applied Cryptography

Book

Reference text for classical cryptographic constructions, block ciphers, hash constructions, and security properties.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Conceptual neighborAES

Feistel networks are a contrasting block-cipher construction to AES-style substitution-permutation networks.

Related Algorithms

Tags

CryptographySymmetric KeySecurityClassic