The Luby–Rackoff block ciphers from a pseudorandom function #
From a keyed family family with n-bit keys, inputs and outputs, the Luby–Rackoff cipher
lubyRackoffCipher ([BS23], Section 4.5) has 3 * n-bit keys k₁ ++ k₂ ++ k₃ and
2 * n-bit blocks u ++ v. Encryption computes three Feistel rounds
w = u ⊕ F(k₁, v), x = v ⊕ F(k₂, w), y = w ⊕ F(k₃, x) and outputs x ++ y; decryption runs
the rounds backwards.
Luby–Rackoff theorem ([BS23], Theorem 4.9): if family is a pseudorandom function,
the Luby–Rackoff cipher is a pseudorandom permutation
(PseudorandomFunction.prp_lubyRackoffCipher).
The proof follows the textbook. The 3-wise parallel composition of the PRF
(PseudorandomFunction.multiKey_constantCount) replaces the three keyed rounds with independent
random functions.
The adapter lubyRackoffAdversary turns a block-cipher adversary into a three-channel one, which
costs one oracle-PPT reduction (isOraclePPT_lubyRackoffAdversary). With random rounds, the
information-theoretic bound LubyRackoff.advantage_feistel3RandomRoundsGame_idealPermGame_le
compares the network with a uniform permutation of 2 * n-bit blocks for deterministic adversaries;
fixing the private coins of the adversary (ProbOracleComp.coinLaw) transfers it to randomized
ones (advantage_lubyRackoffRandomRounds_prpIdealGame_le).
Four rounds ([LR88]; [KL20], Section 8.6): the four-round cipher
lubyRackoff4Cipher (keys k₁ ++ k₂ ++ k₃ ++ k₄) is a strong pseudorandom permutation, secure
against adversaries that may also decrypt (PseudorandomFunction.strongPRP_lubyRackoff4Cipher);
strongly secure block ciphers are [BS23], Section 4.1.3 and Exercise 4.9. The proof has
the same structure, with the bidirectional adapter strongLubyRackoffAdversary, four PRF channels
and the finite-group bound
LubyRackoff.advantage_feistel4StrongRandomRoundsGame_idealStrongGame_le.
Main definitions #
Cslib.Crypto.feistelRoundWord,Cslib.Crypto.feistelNetworkWord,Cslib.Crypto.feistelNetworkWordInv: Feistel rounds on words with round oracles.Cslib.Crypto.lubyRackoffEncrypt,Cslib.Crypto.lubyRackoffDecrypt,Cslib.Crypto.lubyRackoffCipher: the three-round Luby–Rackoff block cipher.Cslib.Crypto.feistelRoundQuery,Cslib.Crypto.feistelNetworkQuery,Cslib.Crypto.feistelNetworkInvQuery: Feistel rounds whose round functions are read from PRF channels.Cslib.Crypto.lubyRackoffQuery,Cslib.Crypto.lubyRackoffAdversary: the reduction to the three-key PRF games.Cslib.Crypto.lubyRackoff4Encrypt,Cslib.Crypto.lubyRackoff4Decrypt,Cslib.Crypto.lubyRackoff4Cipher: the four-round cipher.Cslib.Crypto.strongLubyRackoffQuery,Cslib.Crypto.strongLubyRackoffAdversary: the bidirectional reduction to the four-key PRF games.Cslib.Crypto.pairCodec,Cslib.Crypto.strongPermCodec: block queries on pairs ofn-bit halves, forward and in both directions, on the word channels.
Main results #
Cslib.Crypto.isOraclePPT_lubyRackoffAdversary: the reduction is oracle PPT.Cslib.Crypto.interpret_prfMultiReduction_lubyRackoffAdversary,Cslib.Crypto.interpret_prfMultiReduction_strongLubyRackoffAdversary: against every table, the word hybrid reductions of the two adapters are the finite reductionsCslib.Crypto.LubyRackoff.feistel3ReductionandCslib.Crypto.LubyRackoff.feistel4StrongReductionof the adapted adversary.Cslib.Crypto.eval_prpRealGame_lubyRackoffCipher: the real chosen-plaintext experiment is the real three-key experiment of the reduction.Cslib.Crypto.advantage_lubyRackoffRandomRounds_prpIdealGame_le: with random rounds, aQ-query adversary has advantage at most2 * Q.choose 2 / 2 ^ n + Q.choose 2 / 4 ^ nagainst a uniform permutation.Cslib.Crypto.PseudorandomFunction.prp_lubyRackoffCipher: the Luby–Rackoff theorem.Cslib.Crypto.isOraclePPT_strongLubyRackoffAdversary,Cslib.Crypto.eval_strongPRPRealGame_lubyRackoff4Cipher,Cslib.Crypto.advantage_lubyRackoff4RandomRounds_strongPRPIdealGame_le: the four-round reduction and the random-round bound2 * Q.choose 2 / 2 ^ n + 2 * Q.choose 2 / 4 ^ n.Cslib.Crypto.PseudorandomFunction.strongPRP_lubyRackoff4Cipher,Cslib.Crypto.PseudorandomFunction.prp_lubyRackoff4Cipher: the four-round cipher is a strong pseudorandom permutation, hence a pseudorandom permutation.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6: Section 4.1.3 (p. 101), Exercise 4.9 (p. 169), Section 4.5 (printed pp. 141–147), Theorem 4.9 (p. 143) and Exercise 4.26 (pp. 174–175).
- J. Katz, Y. Lindell, Introduction to Modern Cryptography, 3rd ed.: Section 8.6.
- M. Luby, C. Rackoff, How to Construct Pseudorandom Permutations from Pseudorandom Functions.
Feistel networks on words #
The cipher #
The three-round Luby–Rackoff block cipher with 3 * n-bit keys and 2 * n-bit blocks, built
from a length-preserving keyed family computable in polynomial time ([BS23],
Section 4.5).
Feistel rounds through PRF channels #
The reduction to three PRF keys #
Answer one block query through three PRF channels, which provide the three Feistel rounds.
Malformed blocks are answered with [] without querying.
Run a block-cipher adversary against three PRF channels, answering each block query with
lubyRackoffQuery.
The adapter is oracle PPT for every oracle-PPT block-cipher adversary.
The real chosen-plaintext experiment of the Luby–Rackoff cipher is the real three-key experiment of the adapter.
Random rounds against a random permutation #
Pairs of n-bit halves as their 2 * n-bit blocks on the single word channel: the pair
(u, v) travels as the block u ++ v, and a request of another length carries no query.
The word reduction for three rounds is the finite one. For a length-preserving family
and every table T on n-bit strings, presented on the word channel as
randomFunctionOracle n T, the j-th hybrid reduction of the three-key adapter
lubyRackoffAdversary adversary has the law of the finite reduction
LubyRackoff.feistel3Reduction of PRF.atLevel family n on the adversary adapted along
pairCodec n, run against T. As for interpret_prfMultiReduction_eq_multiKeyReduction, both
PRF games run the word reduction against such a table: prfIdealGame against a uniform one,
prfRealGame against PRF.atLevel family n key for a uniform key.
Three random Feistel rounds against a random permutation, for randomized word-oracle
adversaries ([BS23], proof of Theorem 4.9): with independent uniform random round
functions, a Q-query adversary distinguishes the adapter's three-key ideal game from a uniform
permutation of 2 * n-bit blocks with advantage at most 2 * Q.choose 2 / 2 ^ n + Q.choose 2 / 4 ^ n.
The Luby–Rackoff theorem ([BS23], Theorem 4.9; [LR88]): the three-round Luby–Rackoff cipher built from a pseudorandom function is a pseudorandom permutation against oracle-PPT distinguishers.
Four rounds: a strong pseudorandom permutation #
The four-round Luby–Rackoff block cipher with 4 * n-bit keys and 2 * n-bit blocks, built
from a length-preserving keyed family computable in polynomial time ([LR88]).
The reduction to four PRF keys #
Run a bidirectional block-cipher adversary against four PRF channels, answering each query
with strongLubyRackoffQuery.
The bidirectional adapter is oracle PPT for every oracle-PPT adversary.
The real chosen-ciphertext experiment of the four-round cipher is the real four-key experiment of the bidirectional adapter.
Four random rounds against a random permutation, in both directions #
Bidirectional queries on pairs of n-bit halves on the word channels: a forward query (u, v)
travels on channel false and an inverse query on channel true, each as the block u ++ v.
The word reduction for four rounds is the finite one. For a length-preserving family
and every table T on n-bit strings, presented on the word channel as
randomFunctionOracle n T, the j-th hybrid reduction of the bidirectional adapter
strongLubyRackoffAdversary adversary has the law of the finite reduction
LubyRackoff.feistel4StrongReduction of PRF.atLevel family n on the adversary adapted along
strongPermCodec n, run against T. As for interpret_prfMultiReduction_eq_multiKeyReduction,
both PRF games run the word reduction against such a table: prfIdealGame against a uniform one,
prfRealGame against PRF.atLevel family n key for a uniform key.
Four random Feistel rounds against a random permutation, in both directions
([LR88]), for randomized bidirectional word-oracle adversaries: with independent
uniform random round functions, a Q-query adversary distinguishes the adapter's four-key ideal
game from a uniform permutation of 2 * n-bit blocks with advantage at most
2 * Q.choose 2 / 2 ^ n + 2 * Q.choose 2 / 4 ^ n.
Four-round Luby–Rackoff theorem ([LR88]; [KL20], Section 8.6; strongly secure block ciphers as in [BS23], Section 4.1.3 and Exercise 4.9): the four-round Luby–Rackoff cipher built from a pseudorandom function is a strong pseudorandom permutation against oracle-PPT distinguishers.
The four-round Luby–Rackoff cipher is in particular a pseudorandom permutation.