# A Quantum Detectable Byzantine Agreement Protocol Using Only EPR Pairs
## 3 The 3 Player EPRQDBA Protocol
### Agreement Phase
( \(|\;\mathbb{P}_{c,c}(\mathbf{v}_{A})\;|\approx\frac{m}{4}\;\))then
4 return FALSE
5 if! ( \(|\;\mathbb{P}_{\varpi\oplus j,c\oplus j}(\mathbf{v}_{A})\;|\approx\frac{m}{4}\;\))then
6 return FALSE
7 for\(k=0\)to\(m-1\)do
8 if\((v_{2k+i}\equiv l_{2k+i})\)then
9 return FALSE
10 return TRUE
```  
**Algorithm 1** CheckAlice (i,c,v\({}_{A}\),1)  
```
1# When invoked by [PERSON] to check [PERSON] \(i=1\), \(j=0\)
2# When invoked by [PERSON] to check [PERSON] \(i=0\), \(j=1\)
3 if! ( \(|\;\mathbb{P}_{c,c}(\mathbf{v})\;|\approx\frac{m}{4}\;\))then
4 return FALSE
5 if! ( \(|\;\mathbb{P}_{\varpi\oplus j,c\oplus j}(\mathbf{v})\;|\approx\frac{m}{4}\;\))then
6 return FALSE
7 if! ( \(|\;\mathbb{P}_{\varpi\oplus j,c\oplus j}(\mathbf{v}_{A})\;\triangle\;\mathbb{P}_ {\varpi\oplus j,c\oplus j}(\mathbf{v})\;|\approx 0\;\))then
8 return FALSE
9 return TRUE
```  
**Algorithm 2** CheckWCV (i,j,c,v\({}_{A}\))  
```
1# When invoked by [PERSON] to check [PERSON] \(i=1\), \(j=0\)
2# When invoked by [PERSON] to check [PERSON] \(i=0\), \(j=1\)
3 if! ( \(|\;\mathbb{P}_{c,c}(\mathbf{v})\;|\approx\frac{m}{4}\;\))then
4 return FALSE
5 if! ( \(|\;\mathbb{P}_{\varpi\oplus j,c\oplus j}(\mathbf{v})\;|\approx\frac{m}{4}\;\))then
6 return FALSE
7 for\(k=0\)to\(m-1\)do
8 if\((v_{2k+i}\equiv l_{2k+i})\)then
9 return FALSE
10 return TRUE
```  
**Algorithm 3** CheckWBV (i,j,c,v,I)  
In order to streamline the exposition of the text, all lengthy proofs are relocated in the Appendix A. In the literature, all works focusing on the 3 player setting, assume that there is exactly one traitor among the 3, who can either be the commanding general or one of the lieutenant generals. If we assume that there is precisely one traitor among the 3, we can prove the following Propositions 1 and 2. **Proposition 1** (Loyal [PERSON]). : _If [PERSON] is loyal, the 3 player EPRQDBA protocol will enable the loyal lieutenant general to agree with [PERSON]. Specifically, if [PERSON] and [PERSON] are loyal and [PERSON] is a traitor, [PERSON] will follow [PERSON]'s order. Symmetrically, if [PERSON] and [PERSON] are loyal and [PERSON] is a traitor, [PERSON] will follow [PERSON]'s order._  
**Proposition 2** (Traitor [PERSON]). : _If [PERSON] and [PERSON] are loyal and [PERSON] is a traitor, the \(3\) player EPRQDBA protocol will enable [PERSON] and [PERSON] to reach agreement, in the sense of both following the same order or both aborting._  
**Example 2** (Illustrating the \(3\) player protocol). : _This second example is a continuation of the first. It aims to illustrate the operation of the \(3\) Player EPRQDBA Protocol and give an intuitive explanation of why Propositions 1 and 2 are true._  
_Let us continue Example 1, and examine first the scenario where a loyal [PERSON] sends order \(0\) to both [PERSON] and [PERSON] accompanied by the command vectors \(0_{B}\) and \(0_{C}\) as given by (26) and (27), respectively. We may distinguish the following cases._  
* Both [PERSON] and [PERSON] are loyal. _Then, according to_ \(\textbf{Rule}_{3,1}\) _of the_ \(3\) _player EPRQDBA Protocol_ 1_, all_ \(3\) _players agree to execute order_ \(0\)_._
* There is one traitor among [PERSON] and [PERSON]. _Without loss of generality we may assume that [PERSON] is the traitor, who tries to sabotage the agreement. What can he do?_
* _[PERSON] may claim that he decided to abort because [PERSON] sent him an inconsistent command vector. Then, according to_ \(\textbf{Rule}_{3,2}\) _of the_ \(3\) _player EPRQDBA Protocol_ 1_, [PERSON] will stick to his initial decision, and, together with [PERSON], will agree to execute order_ \(0\)_. In this way, assumption (_\(\textbf{DBA}_{3}\)_) of the detectable Byzantine Agreement protocol, stipulating that commanding general is loyal, then either all loyal lieutenant generals follow the commanding general's order or abort the protocol (recall Definition 2), is satisfied.