Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Feistel cipher
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Cryptography construction}} {{Use dmy dates|date=February 2025}} [[File:Feistel cipher diagram en.svg|right|300px]] In [[cryptography]], a '''Feistel cipher''' (also known as '''Luby–Rackoff block cipher''') is a [[Symmetric-key algorithm|symmetric structure]] used in the construction of [[block cipher]]s, named after the [[Germany|German]]-born [[physicist]] and cryptographer [[Horst Feistel]], who did pioneering research while working for [[IBM]]; it is also commonly known as a '''Feistel network'''. A large number of [[block cipher]]s use the scheme, including the US [[Data Encryption Standard]], the Soviet/Russian [[GOST (block cipher)|GOST]] and the more recent [[Blowfish (cipher)|Blowfish]] and [[Twofish]] ciphers. In a Feistel cipher, encryption and decryption are very similar operations, and both consist of iteratively running a function called a "[[Round (cryptography)|round function]]" a fixed number of times. ==History== Many modern symmetric block ciphers are based on Feistel networks. Feistel networks were first seen commercially in IBM's [[Lucifer (cipher)|Lucifer]] cipher, designed by [[Horst Feistel]] and [[Don Coppersmith]] in 1973. Feistel networks gained respectability when the U.S. Federal Government adopted the [[Data Encryption Standard|DES]] (a cipher based on Lucifer, with changes made by the [[National Security Agency|NSA]]) in 1976. Like other components of the DES, the iterative nature of the Feistel construction makes implementing the cryptosystem in hardware easier (particularly on the hardware available at the time of DES's design). ==Design== A Feistel network uses a ''round function'', a function which takes two inputs{{snd}} a data block and a subkey{{snd}} and returns one output of the same size as the data block.<ref>{{cite book |title=Handbook of Applied Cryptography |first1=Alfred J. |last1=Menezes |first2=Paul C. van |last2=Oorschot |first3=Scott A. |last3=Vanstone |edition=Fifth |year=2001 |page=[https://archive.org/details/handbookofapplie0000mene/page/251 251] |publisher=Taylor & Francis |isbn=978-0849385230 |url-access=registration |url=https://archive.org/details/handbookofapplie0000mene/page/251 }}</ref> In each round, the round function is run on half of the data to be encrypted, and its output is XORed with the other half of the data. This is repeated a fixed number of times, and the final output is the encrypted data. An important advantage of Feistel networks compared to other cipher designs such as [[substitution–permutation network]]s is that the entire operation is guaranteed to be invertible (that is, encrypted data can be decrypted), even if the round function is not itself invertible. The round function can be made arbitrarily complicated, since it does not need to be designed to be invertible.<ref>{{cite book |last=Schneier |first=Bruce |date=1996 |title=Applied Cryptography |location=New York |publisher=John Wiley & Sons |isbn=0-471-12845-7}}</ref>{{rp|465}} <ref name="stinson">{{cite book |first=Douglas R. |last=Stinson |date=1995 |title=Cryptography: Theory and Practice |location=Boca Raton |publisher=CRC Press |isbn=0-8493-8521-0}}</ref>{{rp|347}} Furthermore, the [[encryption]] and [[decryption]] operations are very similar, even identical in some cases, requiring only a reversal of the [[key schedule]]. Therefore, the size of the code or circuitry required to implement such a cipher is nearly halved. Unlike substitution-permutation networks, Feistel networks also do not depend on a substitution box that could cause timing side-channels in software implementations. ==Theoretical work== The structure and properties of Feistel ciphers have been extensively analyzed by [[cryptographer]]s. [[Michael Luby]] and [[Charles Rackoff]] analyzed the Feistel cipher construction and proved that if the round function is a cryptographically secure [[pseudorandom function]], with ''K<sub>i</sub>'' used as the seed, then 3 rounds are sufficient to make the block cipher a [[pseudorandom permutation]], while 4 rounds are sufficient to make it a "strong" pseudorandom permutation (which means that it remains pseudorandom even to an adversary who gets [[oracle machine|oracle]] access to its inverse permutation).<ref name=pseudorandom>{{Citation |first1=Michael |last1=Luby |first2=Charles |last2=Rackoff |title=How to Construct Pseudorandom Permutations from Pseudorandom Functions |journal=SIAM Journal on Computing |volume=17 |issue=2 |date=April 1988 |doi=10.1137/0217022 |pages=373–386 |issn=0097-5397}}.</ref> Because of this very important result of Luby and Rackoff, Feistel ciphers are sometimes called Luby–Rackoff block ciphers. Further theoretical work has generalized the construction somewhat and given more precise bounds for security.<ref name=7-rounds>{{Citation |first=Jacques |editor1-last=Boneh |last=Patarin |title=Advances in Cryptology - CRYPTO 2003 |editor1-first=Dan |url=https://www.iacr.org/archive/crypto2003/27290510/27290510.pdf |doi=10.1007/b11817 |series=Lecture Notes in Computer Science |volume=2729 |date=October 2003 |pages=513–529 |access-date=27 July 2009|isbn=978-3-540-40674-7 |s2cid=20273458 }}</ref><ref>{{cite book |last1=Zheng |first1=Yuliang |last2=Matsumoto |first2=Tsutomu |last3=Imai |first3=Hideki |title=Advances in Cryptology — CRYPTO' 89 Proceedings |chapter=On the Construction of Block Ciphers Provably Secure and Not Relying on Any Unproved Hypotheses |volume=435 |date=20 August 1989 |pages=461–480 |doi=10.1007/0-387-34805-0_42 |language=en |series=Lecture Notes in Computer Science |isbn=978-0-387-97317-3}}</ref> ==Construction details== Let <math>\mathrm{F}</math> be the round function and let <math>K_0, K_1, \ldots, K_n</math> be the sub-keys for the rounds <math>0, 1, \ldots, n</math> respectively. Then the basic operation is as follows: Split the plaintext block into two equal pieces: (<math>L_0</math>, <math>R_0</math>). For each round <math>i = 0, 1, \dots, n</math>, compute : <math>L_{i+1} = R_i,</math> : <math>R_{i+1}= L_i \oplus \mathrm{F}(R_i, K_i),</math> where <math>\oplus</math> means [[XOR]]. Then the ciphertext is <math>(R_{n+1}, L_{n+1})</math>. Decryption of a ciphertext <math>(R_{n+1}, L_{n+1})</math> is accomplished by computing for <math>i = n, n - 1, \ldots, 0</math> : <math>R_{i} = L_{i+1},</math> : <math>L_{i} = R_{i+1} \oplus \operatorname{F}(L_{i+1}, K_i).</math> Then <math>(L_0, R_0)</math> 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 <math>L_0</math> and <math>R_0</math> are not of equal lengths.<ref>{{cite book |last1=Schneier |first1=Bruce |last2=Kelsey |first2=John |title=Fast Software Encryption |chapter=Unbalanced Feistel networks and block cipher design |volume=1039 |date=21 February 1996 |pages=121–144 |doi=10.1007/3-540-60865-6_49 |url=https://www.schneier.com/academic/paperfiles/paper-unbalanced-feistel.ps.gz |access-date=21 November 2017 |language=en |series=Lecture Notes in Computer Science |isbn=978-3-540-60865-3}}</ref> The [[Skipjack (cipher)|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]].<ref name="crypto-rfid">{{cite journal |last1=Bono |first1=Stephen |last2=Green |first2=Matthew |last3=Stubblefield |first3=Adam |last4=Juels |first4=Ari |last5=Rubin |first5=Aviel |last6=Szydlo |first6=Michael |title=Security Analysis of a Cryptographically-Enabled RFID Device |journal=Proceedings of the USENIX Security Symposium |date=5 August 2005 |url=https://www.usenix.org/event/sec05/tech/bono/bono.pdf |access-date=21 November 2017}}</ref> 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.<ref name="thorp">{{cite book |last1=Morris |first1=Ben |last2=Rogaway |first2=Phillip |last3=Stegers |first3=Till |title=Advances in Cryptology - CRYPTO 2009 |chapter=How to Encipher Messages on a Small Domain |volume=5677 |date=2009 |pages=286–302 |doi=10.1007/978-3-642-03356-8_17 |url=http://www.cs.ucdavis.edu/~rogaway/papers/thorp.pdf |access-date=21 November 2017 |language=en |series=Lecture Notes in Computer Science |isbn=978-3-642-03355-1}}</ref> ===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 [[Public-key cryptography|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]]).<ref name=thorp /> ===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 (cipher)|Skipjack]] is a modified Feistel cipher using a Feistel network in its G permutation, and [[Threefish]] (part of [[Skein (hash function)|Skein]]) is a non-Feistel block cipher that uses a Feistel-like MIX function. ==List of Feistel ciphers== Feistel or modified Feistel: {{col-begin}} {{col-break}} * [[Blowfish (cipher)|Blowfish]] * [[Camellia (cipher)|Camellia]] * [[CAST-128]] * [[Data Encryption Standard|DES]] * [[FEAL]] * [[GOST 28147-89]] * [[Information Concealment Engine|ICE]] {{col-break}} * [[KASUMI (block cipher)|KASUMI]] * [[LOKI97]] * [[Lucifer (cipher)|Lucifer]] * [[MAGENTA (cipher)|MAGENTA]] * [[MARS (cryptography)|MARS]] * [[MISTY1]] {{col-break}} * [[RC5]] * [[Simon (cipher)|Simon]] * [[Tiny Encryption Algorithm|TEA]] * [[Triple DES]] * [[Twofish]] * [[XTEA]] {{col-end}} Generalised Feistel: * [[CAST-256]] * [[CLEFIA]] * [[MacGuffin (cipher)|MacGuffin]] * [[RC2]] * [[RC6]] * [[Skipjack (cipher)|Skipjack]] * [[SMS4]] ==See also== * [[Cryptography]] * [[Stream cipher]] * [[Substitution–permutation network]] * [[Lifting scheme]] for discrete wavelet transform has pretty much the same structure * [[Format-preserving encryption]] * [[Lai–Massey scheme]] ==References== {{Reflist}} {{Cryptography navbox | block}} [[Category:Cryptography]] [[Category:Feistel ciphers]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Citation
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Col-begin
(
edit
)
Template:Col-break
(
edit
)
Template:Col-end
(
edit
)
Template:Cryptography navbox
(
edit
)
Template:Reflist
(
edit
)
Template:Rp
(
edit
)
Template:Short description
(
edit
)
Template:Snd
(
edit
)
Template:Use dmy dates
(
edit
)