## 5 Statistical Analysis of the Protocols Based on Subsets of Responses and ECC
### Statistical Predictive Model for Collisions  
The recovery of the file, as outlined in Algorithm 6, assumes that the noise injected in the P-bit long responses creates a BER lower than 25%, an arbitrary number that can be optimized. The number of erratic bits \(t\) is bounded below the threshold T, which in this case is given by \(T=0.25\times P\). If the threshold is too high, then collisions between the N responses become a source of errors during the retrieval of key K. A collision occurs when two randomly picked P-long responses \(\tau_{a}\) and \(\tau_{b}\) share at least T bits with each other. We are assuming that all responses follow a binomial distribution; one in which q, the probability to obtain a state \"0\", equals the probability to obtain a state \"1\" (\(q=0.5\)). We must ensure that the probabilities of having a collision \(\Psi\)(P,T,q) between the responses of the orderly subset and a randomly picked response are acceptably low. Thus, we developed a model to optimize the protocol that focuses on three variables of Algorithm 6: the rate of bad bits injected in the subset of responses, the number of bits P of the responses, and the number of bits of threshold T. This mode is created as follows:  
* Assume that we have two P-bit long streams of responses Ra and Rb: Ra: \(\{r_{a,1},\ldots,r_{a,P}\}\) ; Rb: \(\{r_{b,1},\ldots,r_{b,P}\}\)
* Each stream follows a binomial distribution. The parameter q is the probability q to have a 1.
* The two streams are XORed, bit by bit: \[\{r_{a,1}\oplus r_{b,1},\ \ldots,r_{a,P}\oplus r_{b,P}\}\leftarrow\{r_{a,1}, \ldots,r_{a,P}\}\oplus\{r_{b,1},\ldots,r_{b,P}\}\] (3)
* The resulting stream also follows a binomial distribution with q = 0.5.
* The hamming distance H(Ra,Rb) between Ra and Rb is given by: \[\mathrm{H}(\mathrm{Ra},\mathrm{Rb})=(r_{a,1}\oplus r_{b,1})+\ldots+(r_{a,P} \oplus r_{b,\cdot})\] (4)
* There is a collision when the hamming distance between \(\tau_{a}\) and \(\tau_{b}\) is: H(ra,rb) \(\leq\) T.
* The rate of collisions is: \[\Psi(\mathrm{P},\mathrm{T},\mathrm{q})=\sum_{t=0}^{\mathrm{T}}[\binom{\mathrm{ P}}{\mathrm{t}}\mathrm{q}^{\mathrm{t}}(1-\mathrm{q})^{\mathrm{P}-\mathrm{t}}]\] (5)The plot shown in Figure 8 was generated using T/P in the x-axis, and \(\Psi\)(P,T,q) in the y-axis. T/P varies between 0 and 40%, and \(\Psi\)(P,T,q) varies from \(10^{-7}\) and 1. In our experiment, we measured the best fit for \(q=0.5\) since the distributions are almost perfectly binomial.  
If we assume that there are no responses out of the f responses having the BER between enrollment and key recovery greater than the threshold T, the expected BER (E(K) in key K after recovery is expected to be given by:  
\[\mathrm{E(K)}\ \approx\frac{f}{256}\times\gamma\ \Psi(\mathrm{P,T,q})\ \approx 3\ \Psi(\mathrm{P,T,q}) \tag{6}\]  
where \(\gamma\) is the number of times each response is randomly tested in the recovery cycle. As shown in Section 5.3.3, we used \(\gamma=6\).  
If we assume that the BER of the noise injected in the responses are lower than \(T=0.25\), then an example of predictive use of the model for a 256-bit long key is as follows:  
\(\circ\)\(P=40\rightarrow\mathrm{E(K)}\approx 1.2\times 10^{-3}\)  
\(\circ\)\(P=60\rightarrow\mathrm{E(K)}\approx 6.7\times 10^{-5}\)  
\(\circ\)\(P=80\rightarrow\mathrm{E(K)}\approx 4.3\times 10^{-6}\)  
\(\circ\)\(P=100\rightarrow\mathrm{E(K)}\approx 2.8\times 10^{-7}\)  
The BERs are exponentially reduced by increasing the length P of the responses. The light error correcting schemes, as presented below, quickly increase if the BERs are creating more than one bad bit in a 256-bit long key, which corresponds to a BER of \(4\times 10^{-4}\). This model predicts that \(P=80\) is acceptable and that \(P=100\) is a better operating point.  
Figure 8: Modeling the rate of collisions as a function of threshold T, and P. To minimize collisions, T/P should not be set too high; however, the ratio should be set high enough to avoid errors due to the noise injection in the orderly subset of responses.