# Synthesis of Sources of Common Randomness Based on Keystream Generators with Shared Secret Keys
## 4 Information-Theoretic Analysis of the Source of Common Randomness Based on KSG(Kg)
Theorem 3: The maximum distillation rate of secret keys \(\widetilde{K}_{S}\) for further use is achieved at \(p_{IR0}\) given by \[H\Big{(}K_{G}\mid S_{1},\ S_{2},\ldots,\ S_{n_{p}}\Big{)}\geq|K_{G}|+\sum_{i=1 }^{n_{p}}h_{b}(\varepsilon_{i})-n_{p}. \tag{30}\]5  
Theorem 3.2 identifies the optimal operating point of the system in terms of the initial bit error rate \(p_{IR0}\) at which the maximum usable key rate is achieved. This result is significant for system designers, as it provides a clear criterion for tuning the parameters to maximize secure key output. Figure 4 now illustrates this optimal point and its associated values for all critical quantities. For the autonomy of the proposed system, it is crucial that the successively generated keys are mutually independent. Theorem 3.3: _Let a sequence of distilled keys \(\{K_{i}\}\), \(|K_{i}|=|K|\), \(i=1,\ 2,\ldots\) be generated during the autonomous operation of the system shown in \[H\Big{(}K_{G}\mid S_{1},\ S_{2},\ldots,\ S_{n_{p}}\Big{)}\geq|K_{G}|+\sum_{i=1 }^{n_{p}}h_{b}(\varepsilon_{i})-n_{p}. \tag{30}\]6 Then, it holds that_  
\[H\Big{(}K_{G}\mid S_{1},\ S_{2},\ldots,\ S_{n_{p}}\Big{)}\geq|K_{G}|+\sum_{i=1 }^{n_{p}}h_{b}(\varepsilon_{i})-n_{p}. \tag{30}\]7  
\[H\Big{(}K_{G}\mid S_{1},\ S_{2},\ldots,\ S_{n_{p}}\Big{)}\geq|K_{G}|+\sum_{i=1 }^{n_{p}}h_{b}(\varepsilon_{i})-n_{p}. \tag{30}\]8  
_where \(n_{IR0}\) is the length of the block of sequence \(\{Y_{i}\}\) over which the IR protocol is executed, and \(\mu_{IR}\) is its data remaining efficiency given by (38)._  
Proof of Theorem 3.3.: By applying the chain rule for entropy, it can be written  
\[ \begin{array}{ll}H(K_{i-1},\ X,\ Y,\ K_{i})&=H(K_{i-1})+H(X\mid K_{i-1})+H( Y\mid K_{i-1},\ X)+H(K_{i}\mid K_{i-1},\ X,\ Y)\\ &=H(K_{i-1})+H(X)+H(K_{i}\mid Y)\\ \end{array}  \tag{64}\]  
Since \(H(X\mid K_{i-1})=H(X)\), \(H(Y\mid K_{i-1},X)=0\), and \(H(K_{i}\mid K_{i-1},X,Y)=H(K_{i}\mid Y)\). The same joint entropy can be written in another way  
\[ \begin{array}{ll}H(K_{i-1},K_{i},X,Y)&=H(K_{i-1})+H(K_{i}\mid K_{i-1})+H(X \mid K_{i-1},K_{i})+H(Y\mid K_{i-1},K_{i},X)\\ &=H(K_{i-1})+H(K_{i}\mid K_{i-1})+H(X\mid K_{i})\\ \end{array}  \tag{65}\]  
given that \(H(X\mid K_{i-1},K_{i})=H(X\mid K_{i})\) and \(H(Y\mid K_{i-1},K_{i},X)=0\). By equating the right sides of the equations (64) and (65), we obtain  
\[H(K_{i}\mid K_{i-1})=H(X)+H(K_{i}\mid Y)-H(X\mid K_{i})=H(K_{i}\mid Y)+I(X;\ K_{i}) \tag{66}\]  
Since \(I(X;K_{i})\geq 0\), from (66) it follows  
\[H(K_{i}\mid K_{i-1})\geq H(K_{i}\mid Y). \tag{67}\]  
According to Theorem 3 [32], the following holds  
\[H(K_{i}\mid W_{i})\geq|K|-\frac{1}{ln2}2^{|K|-R(W_{i})}, \tag{68}\]  
where the compression function  
\[G:W_{i}\rightarrow\{0,1\}^{|K|}, \tag{69}\]is a member of a universal class of hash functions [35], while \(R(W_{i})\) denotes the second order Renyi entropy [31]. Since the random variables \(Y\), \(W_{i}\), and \(K_{i}\), form a Markov chain, i.e., \(Y\to W_{i}\to K_{i}\), it holds that  
\[H(K_{i}\mid Y)\geq H(K_{i}\mid W_{i}), \tag{70}\]  
Thus, based on (67)-(70)  
\[H(K_{i}\mid K_{i-1})\geq H(K_{i}\mid Y)\geq H(K_{i}\mid W_{i})\geq|K|-\frac{1} {h2}2^{|K|-R(W_{i})}. \tag{71}\]  
Considering that \(W_{i}\sim B(0.5)\), \(H(K_{i})=|K|\), and \(R(W_{i})=H(W_{i})=n_{IR0}\cdot\mu_{IR}\), we finally obtain  
\[|K|-H(K_{i}\mid K_{i-1})=H(K_{i})-H(K_{i}\mid K_{i-1})=I(K_{i};K_{i-1})\leq \frac{1}{h2}2^{-(n_{IR0}\cdot\mu_{IR}-|K|)}, \tag{72}\]  
which completes the proof. \(\square\)  
**Remark 7**: _Based on Theorem 4, we conclude that the secret keys generated by the CR KSG system have maximum entropy and are mutually independent.