## 5 Immunity Feature of SRFG  
Now, let's discuss about the correlation immunity characteristics exhibited by the function generator's outputs. Considering each of the \(N\) input variable \(V_{i}\) as \(n\) bit binary vector \(V_{i}=\{v_{1},v_{2},\ldots,v_{n}\},i=1,2,...,N\) for the combined symmetric and balanced function \(f,f\) is correlation immune if the following condition satisfies:  
\[Prob(f=v_{i})=\frac{1}{2},1\leq i\leq n \tag{18}\]  
The set of all correlation immune functions of \(N\) variables of \(n\) bits each is denoted by \(C_{N}^{n}\). Furthermore, the weight of correlation immune function \(f\) of the generator is given by:  
\[a=w(f)=\frac{n}{2},f\in C_{N}^{n} \tag{19}\]Let \(f^{u}\) and \(f^{l}\) be the upper and lower halves of equal length \(\frac{n}{2}\) for the function generator's outputs as shown in Figure 3. As, \(f\in CI_{N}^{n}\), \(w(f^{u})=w(f^{l})=\frac{u}{4}\). If there are \(k\) places out of \(\frac{u}{4}\) 1's in the \(f^{u}\) where the corresponding positions in reverse of \(f^{l}\), denoted as \(\left(f^{l}\right)^{r}\), do not match. Therefore, the number of bits match with respect to 1 for the function is given as:  
\[M_{1}(f^{u},(f^{l})^{r})=\frac{n}{4}-k \tag{20}\]  
Following Equation (20), we can also say that there are \(k\) places out of \(\frac{u}{4}\) 1's in the \(f^{u}\) where the corresponding positions in \(\left(f^{l}\right)^{r}\) do not match. Therefore, the number of bits match with respect to 0 for the function is given as:  
\[M_{0}(f^{u},(f^{l})^{r})=\frac{n}{4}-k \tag{21}\]  
Hence, we can write:  
\[\begin{split} M(f_{c},(f)^{r})=2M(f^{u},(f^{l})^{r})\\ =2\bigg{(}\frac{n}{4}-k+\frac{n}{4}-k\bigg{)}=n-4k\end{split} \tag{22}\]  
The correlation immune functions with the same values of \(M(f,(f)^{r})\) form an equivalence class.  
**Proposition 1**: _Let \(f\in CI_{N}^{n}\) and \(M(f,(f)^{r})=m\). Then \(\forall\ M_{0}(f,(f)^{r})\) and \(M_{1}(f,(f)^{r})\),_  
\[min[M_{0}(f,(f)^{r})-M_{1}(f,(f)^{r})]=min[m]\mapsto 0 \tag{23}\]  
Apart from the correlation immunity, algebraic immunity is also a requirement for cryptographic algorithms. Algebraic immunity also is related with the annihilator of a function [37]. This property helps the algorithm to prevent algebraic attacks [38; 39] against the cryptographic algorithms.  
We use the annihilators here. If \(f\in B_{N}\), any function of the set \(A(f)=\{g\in B_{N}|gf=0\}\) is the annihilator of the function \(f\). The algebraic immunity of \(f\) is denoted by \(AI(f)\). It is defined as the minimum degree of all the nonzero annihilators of \(f\) or \(f_{1}\). The value of \(AI(f)\) is given as:  
\[AI(f_{c})=min[deg(g)|g\
eq 0,g\in A(f)\cup A(f_{1})] \tag{24}\]  
The idea is that for a given function \(f\) on \(N\)-variables, a reduced set of homogeneous linear equations is required by solving which one can decide whether there exist annihilators of \(f\) at a specific degree [40]. The experimented value for good designs of functions must possess the \(f\) or \(f_{1}\) must not have any annihilator of degree more than \(\frac{n}{2}\). SRFG exhibits this feature as the degree of SRFG functions is \(\frac{n}{2}\). as they are balanced. As the SRGF outputs the symmetric function which are balanced and therefore minimum degree is always \(\frac{n}{2}\). Therefore, the algebraic immunity of the outputs from SRGF is always \(\frac{n}{2}\) which is always optimal.  
Figure 3: Concept of lower and upper halves of bitstring.