enter image description hereI'm learning about Feistel Ciphers at the moment, but having issues with the formulae, so I can't move on from it.


  1. $𝐿𝐸_{𝑖+1} = 𝑅𝐸_𝑖$
  2. $𝑅𝐸_{𝑖+1} = 𝐿𝐸_𝑖 \oplus 𝐹( 𝑅𝐸_𝑖 , 𝐾_𝑖)$

For the round function $𝐹( 𝑅𝐸_𝑖 , 𝐾_𝑖)$, could someone advise on what exactly I need to do? Let's say my key is $1197$, what needs to happen in between the brackets, $(𝑅𝐸_𝑖 , 𝐾_𝑖)$ , full diagram screenshot attached, thanks.enter image description here

  • $\begingroup$ Welcome to Cryptography. I've edited your question, please check. The round function which is usually called the $F$ function performs confusion and diffusion. What is your actual question? Normally, one must define it as in DES $\endgroup$ – kelalaka Mar 2 '19 at 19:49
  • $\begingroup$ Thanks for getting back to me. So If I have a plaintext and divide it into 2 parts, left and right, I need to put the right side through the round function. This should get me my value to XOR with the left side, but i'm not sure what exactly I have to do with the right side and round function in the 1st place. $\endgroup$ – terodee Mar 2 '19 at 19:54
  • $\begingroup$ Yes, this is what the 1. and 2. equations already says. What is the problem? Did you see this question? $\endgroup$ – kelalaka Mar 2 '19 at 19:57
  • $\begingroup$ Yes I checked he link you supplied but I can't really make sense of it. As I said Im only learning about it now, so still a bit raw with how it works. I did find something on a video from another site, it seems to imply that I must XOR the right side with Key. From here I would shift this value by 1 it and XOR it with the left side, does that sound correct? I have added a screenshot of this above. $\endgroup$ – terodee Mar 2 '19 at 21:22
  • 1
    $\begingroup$ It is necessary to distinguish between on one hand Feistel cipher that is a structure or a tool that is used to construct block ciphers, on the other hand concrete applications of this tool. So $F$ is a function that takes two inputs, it could be any function but requirements are that it provides confusion and diffusion. The output of $F$ is then xored with the other part of the input. It might be worth mentioning that the keys $K_i$ are generated by some other procedures form input key.Now if you want to see a concrete implementation of $F$ then look at $DES$ for example. $\endgroup$ – Marc Ilunga Mar 2 '19 at 22:02

I guess it makes more sense if you write the two equations like this (referring to the nice diagram in Wikipedia): $$L_{i+1}=R_i,\; R_{i+1}=L_i\oplus F_{K_i}(R_i).$$ In each round, the round function $F$ takes as input the corresponding round key $K_i$ and the previous round's right output, then computes the output value, which is then XORed with the previous round's left output. $F$ is usually modeled as a pseudorandom function and has many instantiations (see here for a list of Feistel ciphers, of which each specifies its own $F$ instantiation and key schedule). This post discusses the requirements/goals for good $F$ instantiations.

  • $\begingroup$ Thanks for this, makes much more sense to me now. My maths is a bit rusty! This link is also very helpful with explaining what key I should use, thank you. $\endgroup$ – terodee Mar 3 '19 at 15:51
  • $\begingroup$ @terodee One answer to that link mentioned the key schedule, but it seems for SPNs rather than Feistel ciphers. The key schedules are also specified in the listed Feistel cipher instantiations. $\endgroup$ – Shan Chen Mar 3 '19 at 20:58

Function $F(x)$ should be function with pseudo-random output (if you change 1 bit in input there should be a chance to change half of output bits). There is no need to use a bijection, because in schema we do not need $F^{-1}(x)$.

Idea behind a Feistel Network is to use some function to hide bits of input behind pseudo-random outputs (but predictable).


Your Answer

By clicking β€œPost Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.