# A Novel Hybrid Elementary Cellular Automata and Its Application in a Stream Cipher
## 4 Stream Cipher Based on HECA-M
### Description of Proposed Stream Cipher
The number of cells in the HECA-M reaches 512, so the maximum period of the keystream is \(2^{512}\). This amount far exceeds the computational capacity of modern computers. Moreover, the theoretical period of RC4 is only \(10^{100}\). In conclusion, the period of the proposed stream cipher is long enough for security. 5. Autocorrelation and cross-correlation

A qualified stream cipher's autocorrelation and cross-correlation coefficients should be close to zero. The value of constant vector \(\mathbf{IV}\) and secret key \(\mathbf{SK}\) with 512 and 256 bits are set as follows:

\[ \begin{array}{ll}\mathbf{IV}=&4\text{F44}\_7\text{B96}\_\text{F87}\_\text{BDF4} \_\text{8 AA2}\_\text{4 EAA}\_\text{1902}\_\text{4D5E}\\ &4\text{D9C}\_\text{A988}\_\text{A153}\_\text{700E}\_\text{BA80}\_\text{582D} \_\text{8 EAF}\_\text{EC02}\\ \text{SK}=&99\text{D}\_\text{8 EC3}\_\text{20B3}\_\text{AA64}\_\text{1246}\_ \text{23E9}\_\text{0855}\_\text{429F}\\ &\text{E7 AF}\_\text{61E3}\_\text{4 BB3}\_\text{5B32}\_\text{FD07}\_\text{0781} \_\text{1B3E}\_\text{E3A8}\\ &9\text{E96}\_\text{ODEB}\_\text{DDBA}\_\text{41E0}\_\text{BEF8}\_\text{8 BB1} \_\text{9F03}\_\text{CA36}\\ &2786\_\text{F5 EE}\_\text{8E6F}\_\text{D29E}\_\text{7449}\_\text{D32D}\_\text{ -F4E}\_\text{1294}\text{ (512 bits)}\\ \\ \end{array} , \tag{9}\]

\[ \begin{array}{ll}\mathbf{IV}=&9\text{F0E}\_\text{ODDA}\_\text{D99}\_\text{CA57} \_\text{C9 BB}\_\text{C976}\_\text{A16E}\_\text{8 DF0}\\ &\text{F655}\_\text{306A}\_\text{16E}\_\text{ADF7}\_\text{652A}\_\text{4157} \_\text{3470}\_\text{83A2}\\ \text{SK}=&7232\_\text{65F}\_\text{C294}\_\text{951D}\_\text{34C4}\_\text{78 FC} \_\text{8 EB}\_\text{F46F}\\ &\text{ECB0}\_\text{7 FE5}\_\text{E453}\_\text{B9D8}\_\text{DBCB}\_\text{8984} \_\text{6F6C}\_\text{E0B2}\text{ (256 bits)}\\ \end{array}  \tag{10}\]

We change one bit of \(\mathbf{SK}\) to acquire \(\mathbf{SK}^{\star}\). Moreover, the inverse of \(\mathbf{SK}\), \(\
eg\mathbf{SK}\), is also obtained. Then, \(\mathbf{SK}\), \(\mathbf{SK}^{\star}\), and \(\
eg\mathbf{SK}\) are regarded as the secret keys, and the keystreams \(\mathbf{KS}\), \(\mathbf{KS}^{\star}\), \(\
eg\mathbf{KS}\) with 10,000 bits are generated by the proposed stream cipher correspondingly. The autocorrelation coefficient of \(\mathbf{KS}\) and the cross-correlation coefficients between \(\mathbf{KS}\) and \(\mathbf{KS}^{\star}\), \(\
eg\mathbf{KS}\), are shown in Figure 9 (512 bits) and Figure 10 (256 bits). In Figures 9 and 10, the \(X\)-axis and \(Y\)-axis represent the lags and correlation coefficient, respectively. As shown in Figures 9a,b and 10a,b, no matter how long the secret key is, the cross-correlation coefficients between \(\mathbf{KS}\) and \(\mathbf{KS}^{\star}\), \(\
eg\mathbf{KS}\), are close to zero. Moreover, in Figures 9c and 10c, the autocorrelations of \(\mathbf{KS}\) are approximately equal to zero. Hence, the keystream generated by the proposed stream cipher is sensitive to the secret key. A slight change in the secret key can lead to a completely different keystream. Furthermore, the keystream generated by the inverse of the secret key is also independent of the original

Figure 9: The correlation coefficients of the keystreams generated by the proposed stream cipher under the secret keys with 512 bits. (**a**) The cross-correlation coefficient between \(\mathbf{KS}\) and \(\mathbf{KS}^{\star}\). (**b**) The cross-correlation coefficient between \(\mathbf{KS}\) and \(\
eg\mathbf{KS}\). (**c**) The autocorrelation coefficient of \(\mathbf{KS}\). keystream _KS_. In other words, it is difficult for the enemy to find the laws of the secret key from the different keystreams. In addition, correlation analysis is an effective method to deduce the relationship between the keystream and secret key of the stream cipher. The enemy can utilize this method to restore the initial value of the keystream generator, that is, the secret key. Hence, the keystream should be independent of its secret key.