## 2 Literature Review
### Quantum Key Distribution BB84 Protocol  
The BB84 protocol is designed to ensure unconditional security in the transmission of a shared secret key between two parties, [PERSON] and [PERSON] [26]. The BB84 protocol uses quantum bits (qubits) for the transmission of data in the quantum channel. The process involves encoding data bits into various polarized states of photons, creating qubits essential for secure key transmission within the quantum channel [27]. In quantum communication, polarized states often appear as either vertical and right diagonal (traditionally denoted as \"1\") or horizontal and left diagonal (usually indicated as \"0\"). Table 1 shows the use of two distinct bases, labeled as \"+\" and \"\(\times\)\", for detecting these photons [28]. The quantum state \(|\psi\rangle\) is represented as a linear combination of basis states [29]:  
\[|\psi\rangle=\alpha|0\rangle+\beta|1\rangle \tag{1}\]  
where \(\alpha\) and \(\beta\) are complex probability amplitudes. **Basis states in the rectilinear basis (Z basis) and diagonal basis (X basis):**  
\[|0\rangle:\text{Bit value 0}\] \[|1\rangle:\text{Bit value 1}\]  
\[|+\rangle:\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle):\text{Bit value 0}\]  
\[|-\rangle:\frac{1}{\sqrt{2}}(|0\rangle-|1\rangle):\text{Bit value 1}\]  
**Classical post-processing in BB84 protocol:** \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Qubit** & **[PERSON]’s** & **[PERSON]’s** & **[PERSON]’s** & **[PERSON]’s** & **Bob’s** & **Bob’s** & **Basis** & **Basis** & **Bit Match** & **Error** \\  & **Basis** & **Bit** & **Basis** & **Basis** & **Basis** & **Basis** & **Basis** & **Basis** & **Basis** \\ \hline \(|\psi\rangle_{1}\) & + & 0 & \(\times\) & 0 & \(\times\) & 1 & No & - & No \\ \(|\psi\rangle_{2}\) & \(\times\) & 1 & + & 1 & + & 1 & No & - & No \\ \(|\psi\rangle_{3}\) & + & 0 & + & 0 & + & 0 & Yes & Yes & No \\ \(|\psi\rangle_{4}\) & \(\times\) & 1 & \(\times\) & 1 & \(\times\) & 1 & Yes & Yes & No \\ \(|\psi\rangle_{5}\) & + & 0 & + & 0 & + & 1 & Yes & No & Yes \\ \(|\psi\rangle_{6}\) & \(\times\) & 1 & + & 1 & + & 0 & No & - & No \\ \(|\psi\rangle_{7}\) & + & 0 & \(\times\) & 0 & \(\times\) & 0 & No & - & No \\ \(|\psi\rangle_{8}\) & \(\times\) & 1 & \(\times\) & 0 & \(\times\) & 0 & Yes & No & Yes \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Security of BB84 protocol quantum channel. As can be seen in Table 2, the BB84 protocol involves four main steps: key sifting, error correction, key reconciliation, and privacy amplification [30]. Firstly, in key sifting, [PERSON] sends the bases he used to [PERSON] to confirm against the qubits she sent. Then, during error correction, [PERSON] tells [PERSON] the correct bases, and [PERSON] discards any bits measured incorrectly. After this, the \"quantum bit error rate (QBER)\" is calculated. This rate is found by comparing the results of some qubits' measurements between [PERSON] and [PERSON] to see how often they disagreed [31]. If there has been interference from an eavesdropper, called [PERSON], the QBER goes over a certain level. In that case, both [PERSON] and [PERSON] throw out the keys and start over. Even if the QBER is below the threshold, it is still not zero, meaning that [PERSON] and [PERSON] do not have the same keys. Therefore, in addition to correcting errors, they use the cascade protocol for key reconciliation. According to this protocol, [PERSON] and [PERSON] segment the bits into fixed-size blocks, compute the parity of each block, and exchange these data for error correction. The BB84 protocol concludes with privacy amplification, where the shared secret key undergoes further processing to bolster its security. This involves applying a one-way function that reduces the information accessible to potential eavesdroppers. Subsequently, the final key is utilized for encrypting and decrypting messages exchanged between [PERSON] and [PERSON]. The BB84 protocol has proven its resilience against diverse attacks, including man-in-the-middle and eavesdropping attempts [32].