## 3 Synchronization of Master-Slave Large-Scale CRNGs  
The design of large-scale CRNGs has been completed. We continue to study the synchronization of master and slave large-scale CRNGs. As mentioned above, the large-scale CRNG is composed of n chaotic CRNGs with the same structure, so the synchronization controller for each chaotic CRNGs will also have the same structure. Therefore, we first consider the design of a single master-slave CRNG. The master and slave CRNGs are defined, respectively, as below. Master random number generator:  
\[ \begin{array}{l}x_{1}(k+1)=\lambda_{1}x_{2}(k)+\lambda_{2}\\ x_{2}(k+1)=\beta_{1}x_{1}(k)+\beta_{2}x_{2}^{3}(k)+\beta_{3}x_{2}^{2}(k)+\beta _{4}x_{2}(k)+\beta_{5}\end{array}  \tag{5}\]  
Slave random number generator:  
\[ \begin{array}{l}y_{1}(k+1)=\lambda_{1}y_{2}(k)+\lambda_{2}\\ y_{2}(k+1)=\beta_{1}y_{1}(k)+\beta_{2}y_{2}^{3}(k)+\beta_{3}y_{2}^{2}(k)+\beta _{4}y_{2}(k)+\beta_{5}+u(k)\end{array}  \tag{6}\]  
Figure 6: Holtek 32-bit microcontroller. Figure 7: 256 random binary signals. where \(x_{i}\) and \(y_{i}\), \(i=1,2\) are, respectively, the state variables of the master and slave systems. \(u(k)\in R\) is the control input introduced to achieve synchronization between the master and slave CRNGs. By defining \(e_{i}(k)=y_{i}(k)-x_{i}(k),i=1,2\), the error dynamics can be obtained by the following equation:  
\[ \begin{array}{l}e_{1}(k+1)=\lambda_{1}e_{2}(k)\\ e_{2}(k+1)=\beta_{1}e_{1}(k)+\beta_{2}(y_{2}^{3}(k)-x_{2}^{3}(k))+\beta_{3}e_ {2}(k)(y_{2}(k)+x_{2}(k))+\beta_{4}e_{2}(k)+u(k)\end{array}  \tag{7}\]  
In the following, the discrete sliding mode control (DSMC) is utilized to achieve the synchronization. Generally, the DSMC design is composed of two steps. First, we need to select an appropriate switching function for error dynamics (7) such that the sliding motion can ensure the convergence of the error states. Second, we need to propose a DSMC to guarantee the existence of the sliding mode and maintain the error dynamics on the sliding manifold [2]. To achieve the synchronization based on DSMC, a switching function is selected as:  
\[s(k)=e_{2}(k)+\alpha e_{1}(k) \tag{8}\]  
Assuming the error dynamics is already on the sliding manifold (\(s(k)=0\)), we have  
\[e_{2}(k)=-\alpha e_{1}(k) \tag{9}\]  
Substituting (9) into (7), we can obtain  
\[e_{1}(k+1)=-\alpha\lambda_{1}e_{1  
Considering the security of future applications and reducing the complexity of synchronization controller for the master-slave large-scale CRNGs, we divide the controller \(u(k)\) (12) into two parts, \(u_{m}(k)\) and \(u_{s}(k)\) satisfying \(u(k)=u_{m}(k)+u_{s}(k)\), where \(u_{m}(k)\) and \(u_{s}(k)\) are the combination signals of master and slave random number generator, respectively. When the master and slave CRNGs are in different locations, only the information \(u_{m}(k)\) is sent from the master CRNG through the public channel while \(u_{s}(k)\) is generated in the slave CRNG and never appear in the insecure channel. Therefore, the synchronization controller \(u(k)\) can be composed in the slave side and the master and slave CRNGs can be synchronized without transmitting full secret information through the public channel. After completing the synchronization of the single master-slave CRNGs, the large-scale synchronized master-slave CRNGs is given as shown in Figure 12.  
In Figure 12, First, the master CRNG\({}_{i},i=1,2\ldots,n\), sequentially generates the information \(u_{mi}(k)\) required by each RNG\({}_{i}\) synchronization controller and in the slave RNG\({}_{i},i=1,2\ldots,n\), also sequentially generates the required information \(u_{si}(k)\). \(u_{mi}(k)\) and \(u_{si}(k)\) are, respectively, time-sharing selected by the selectors in the master and slave sides, then \(u_{mi}(k)\) and \(u_{si}(k)\) is integrated to form the aforementioned controller (\(u_{i}(k)=u_{mi}(k)+u_{si}(k)\)) and then the synchronization between master CRNG\({}_{i}\) and slave CRNG\({}_{i}\), \(i=1,2\ldots,n\) can be guaranteed.