# A Novel Hybrid Elementary Cellular Automata and Its Application in a Stream Cipher
## 3 HECA with Dynamic Mask and Its Properties
### Properties Analyses of the HECA-M  
The randomness of the sequence generated by the HECA-M is a significant property determining the security of the stream cipher. However, we found that not all HECA-Ms under a certain rule group (\(rm\), \(r\)0, \(r\)1) can meet randomness requirements. Moreover, the number of cells in the HECA-M is crucial for the period. Meanwhile, it is also related to the randomness of the sequence generated by the HECA-M. In order to find the rule groups under which the HECA-M possesses good randomness, the information entropy (IE) is introduced to analyze sequences generated by HECA-Ms with different rule groups and the number of cells. The status values of eight cells in the middle position in the driving part are regarded as binary numbers with eight bits chosen as the outputs of the HECA-M. Thus, the ideal IE of these outputs is eight. Furthermore, the closer to eight the IE is, the better uncertainty the outputs possess. We assign the number of cells to 100 in the driving or mask parts. Two binary numbers with 100 bits generated randomly are utilized to initialize the HECA-M. Moreover, we select three global chaotic rules from Table 3 to compose the rule group. Thus, there are 39,304 (34 \(\times\) 34 \(\times\) 34) groups. The IEs of each rule group are shown in Figure 4. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline No. & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \\ \hline Rule & 18 & 183 & 22 & 151 & 30 & 86 & 135 & 149 & 45 \\ \hline No. & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 \\ \hline Rule & 75 & 89 & 101 & 60 & 102 & 153 & 195 & 90 & 165 \\ \hline No. & 19 & 20 & 21 & 22 & 23 & 24 & 25 & 26 & 27 \\ \hline Rule & 105 & 106 & 120 & 169 & 225 & 129 & 126 & 137 & 110 \\ \hline No. & 28 & 29 & 30 & 31 & 32 & 33 & 34 & \\ \hline Rule & 193 & 146 & 182 & 150 & 161 & 122 & 193 & \\ \hline \end{tabular}
\end{table} 
Table 3: The look-up table (LUT) of global chaotic rules. _No._ indicates the index of the rule. Figure 3: The structure of the HECA-M. The dotted (solid) cycle represents the cell with the value of “0” (“1”) in the mask part, and the blue (yellow) cycle denotes the cell with the value of “0” (“1”) in the driving part. \(rm\) = 45, \(r\)1 = 60, and \(r\)0 = 105. In Table 4, not all IEs of the sequences generated by the HECA-Ms with these rule groups are close to the ideal value 8. Furthermore, the HECA-Ms under these rule groups with different numbers of cells are analyzed using IE. The results are shown in Figure 5.  
In Figure 5, the title of each figure denotes the rule groups of this HECA-M. The X-axis represents the number of cells, also called the length of the cell space, in the mask part or driving part. The Y-axis indicates the IEs of sequences generated by the HECA-M with different lengths under a certain rule group. According to Figure 5, it is easy to know that the results of HECA-Ms under the rule groups (18,60,105), (183,105,60), (146,102,105), and (182,105,60) are sensitive to the length of the cell space, even though the length reaches 1000. Moreover, the IEs of HECA-M with rule groups (151,135,169), (102,75,149), and (153,86,151) are farther from the ideal value 8 than others. The uncertainty of sequences generated by these HECA-Ms under the above seven rule groups is unstable and defective. Thus, we select HECA-Ms under chaotic rule groups except these seven to construct the stream cipher as shown in LUT (Table 5). Figure 5: The IEs of sequences generated by HECA-Ms under different rule groups with varying numbers of cells.