Let \mathrm{F} be the round function and let K_0, K_1, \ldots, K_n be the sub-keys for the rounds 0, 1, \ldots, n respectively. Then the basic operation is as follows: Split the plaintext block into two equal pieces: (L_0, R_0). For each round i = 0, 1, \dots, n, compute : L_{i+1} = R_i, : R_{i+1}= L_i \oplus \mathrm{F}(R_i, K_i), where \oplus means
XOR. Then the ciphertext is (R_{n+1}, L_{n+1}). Decryption of a ciphertext (R_{n+1}, L_{n+1}) is accomplished by computing for i = n, n - 1, \ldots, 0 : R_{i} = L_{i+1}, : L_{i} = R_{i+1} \oplus \operatorname{F}(L_{i+1}, K_i). Then (L_0, R_0) is the plaintext again. The diagram illustrates both encryption and decryption. Note the reversal of the subkey order for decryption; this is the only difference between encryption and decryption.
Unbalanced Feistel cipher Unbalanced Feistel ciphers use a modified structure where L_0 and R_0 are not of equal lengths. The
Skipjack cipher is an example of such a cipher. The
Texas Instruments digital signature transponder uses a proprietary unbalanced Feistel cipher to perform
challenge–response authentication. The
Thorp shuffle is an extreme case of an unbalanced Feistel cipher in which one side is a single bit. This has better provable security than a balanced Feistel cipher but requires more rounds. There exists Type-1, Type-2, and Type-3 Feistel networks, where the Feistel function is one fourth the size of the block but operates a varying number of times within one round.
Other uses The Feistel construction is also used in cryptographic algorithms other than block ciphers. For example, the
optimal asymmetric encryption padding (OAEP) scheme uses a simple Feistel network to randomize ciphertexts in certain
asymmetric-key encryption schemes. A generalized Feistel algorithm can be used to create strong permutations on small domains of size not a power of two (see
format-preserving encryption).
Feistel networks as a design component Whether the entire cipher is a Feistel cipher or not, Feistel-like networks can be used as a component of a cipher's design. For example,
MISTY1 is a Feistel cipher using a three-round Feistel network in its round function,
Skipjack is a modified Feistel cipher using a Feistel network in its G permutation, and
Threefish (part of
Skein) is a non-Feistel block cipher that uses a Feistel-like MIX function. ==List of Feistel ciphers==