# Unbalanced Feistel network function

I am trying to understand how an unbalanced Feistel network works. I came across this image: It says that the function takes $$b$$ bits to $$y$$ bits. Which works on the first step, however clearly doesn't on the next one. What am I not getting? If you always apply the function to the side with $$b$$ bits would that break the cypher? I am guessing it does.

• The image is misleading. It is still taking b bits. You can get it from $b$ msb. Jun 18, 2020 at 16:54
• @kelalaka what does "$b$ msb" mean exactly? Jun 18, 2020 at 16:56
• $b$ Most Significant Bits. Jun 18, 2020 at 16:57
• @kelalaka and do these bits become a prefix or a suffix to the $y$ bits? Jun 18, 2020 at 17:03

Let formalize it

• Round function $$R:\{0,1\}^b \to \{0,1\}^y$$ (This is bad naming, $$F$$ was better here as in DES)

• Input to each round is $$b+y$$ bit register/array $$I$$.

• Output of each round $$O = (R(\texttt{MSB}(b,I)) \oplus \texttt{LSB}(y,I)) \mathbin\| \texttt{MSB}(b,I)$$

Therefore $$O$$ is again $$b+y$$ bits register/array as an input to next round.

• $$\texttt{MSB}(b,I)$$ the Most Significant $$b$$ Bits of register $$I$$.
• $$\texttt{LSB}(y,I)$$ the Least Significant $$y$$ Bits of register $$I$$.

Example

Let $$I=\texttt{[0,1,1,1,0,1,0,0,1,0,0,1,1,0,0,1]}$$ be 16-bit register then

• $$\texttt{MSB}(3,I) = \texttt{[0,1,1]}$$, and
• $$\texttt{LSB}(12,I) = \texttt{[1,0,1,0,0,1,0,0,1,1,0,0,1]}$$

Note that here we used binary representation for $$I$$, not the array repsentation.