## 5 Improved Setup with a Fully Active Base Selection
### Attack Analysis
Using the same approach, I can calculate the out-of-gate coincidence rate for the DCR:  
\[p_{AOut}=\bigg{(}\frac{1}{f_{G}}-t_{G}\bigg{)}^{2}f_{DCR}^{2}. \tag{6}\]  
The qubits do not fall outside of a gate and therefore do not cause out-of-gate coincidences. \[p_{QOut}=0. \tag{7}\]  
The total out-of-gate coincidence probability for the regular BB84 protocol in setup in Figure 4 equals  
\[p_{COut}=p_{AOut}+p_{QOut}-p_{AOut}p_{QOut}=\bigg{(}\frac{1}{f_{G}}-t_{G} \bigg{)}^{2}f_{DCR}^{2} \tag{8}\]  
where \(f_{G}\) is rate at which [PERSON] emits qubits. Using the same set of communication parameters as in the previous example and \(f_{G}=10\) MHz, one arrives at \(p_{COut}=9.0\times 10^{-9}\). Our defense strategy relies on the fact that both the in-gate and out-of-gate coincidence probabilities, described in Equations (5) and (8), are dramatically enhanced under a strong-light attack, as will be shown below. **The case of a CW DBA. ** Let \(N\) be the number of photons arriving during a gate onto a detector. Then, the probability \(p_{N}\) that the detector with a quantum efficiency \(\epsilon\) will detect at least once is given by [31]  
\[p_{N}=1-(1-\epsilon)^{N} \tag{9}\]  
or even closer to unity in the case of a superlinear detector [6]. Considering a coherent blinding light with an average photon number \(\langle m\rangle\) arriving on [PERSON] during a gate, the overall coincidence probability, according to Equation (9), is  
\[p_{DBAIn}=\bigg{(}1-(1-\epsilon_{B})^{\frac{\langle m\rangle}{2}}\bigg{)}^{2}. \tag{10}\]  
Assuming an attack using as few as \(\langle m\rangle=20\) photons incident on [PERSON] per gate, and assuming that \(\epsilon_{B}=0.25\), then the coincidence probability \(p_{DBAIn}\) is about 0.94, and it would quickly approach a theoretical maximum of 1 for a larger \(\langle m\rangle\). This is about six orders of magnitude higher than the in-gate coincidence probability of the regular BB84 protocol, \(p_{CIn}=2\times 10^{-6}\), as calculated above, even though the incident optical power considered in this example is much smaller what is required for an actual detector-blinding attack. **In the case of a pulsed DBA,** which operates on the principle of thermal blinding with strong out-of-gate pulses, such an attack will not enlarge in-gate coincidences between detectors in the same base. However, as explained above, each blinding light pulse will create one out-of-gate coincident pair of detections in two detectors belonging to the base which is currently selected by the QRNG. The coincidence probability for either detection base, per gate, is given by  
\[p_{DBAOut}=\frac{f_{BPR}}{f_{G}} \tag{11}\]  
where \(f_{BPR}\) is the minimum required blinding pulse rate, 70 kHz according to [4], and, as explained above, this must be at least doubled by Eve because of the active base selection in this setup. As justified above, I do not add dark counts to that rate. Assuming \(f_{BPR}=140\) kHz and that the other parameters are the same as in the previous examples, I obtain \(p_{DBAOut}=1.4\times 10^{-2}\). On the other hand, the coincidence probability of the undisturbed QKD \(p_{COut}=9.0\times 10^{-9}\), as calculated above, is more than six orders of magnitude smaller. This demonstrates that for both in-gate and out-of-gate DBAs, the corresponding coincidence probabilities will be strongly enhanced with respect to the undisturbed BB84 when using the setup shown in \[p_{AIn}=p_{DCR}^{2}\cong t_{G}^{2}f_{DCR}^{2} \tag{3}\]0 This fact is the basis for my defense strategy, which should work for any type of strong-light attack, including a DBA. The high ratio of coincidence probabilities under the DBA and in a normal communication is robust across a realistic range of communication parameters. For example, in an extreme state-of-the-art communication with a qubit rate \(f_{G}=1\) GHz and a gate time \(t_{G}=200\) ps, the in-gate ratio stays the same while the out-of-gate ratio becomes 100 times greater.