## 2 Overview
### Quantum Cryptography
#### 2.1.2 Key Distillation  
Public channels are the second medium of communication between both communicating parties. Unlike the quantum channel, the public channel does not protect information from eavesdropping by default. Therefore, it is used only for transferring non-confidential data to perform the key distillation. There are three main stages of key distillation [14]: Quantum Bit Error Rate (QBER) estimation, error correction, and privacy amplification.  
An attempt to eavesdrop quantum communication is not the only source of errors in the quantum channel. In fact, multiple factors can affect the transmission of qubits, such as disturbances in the channel, noise in the detectors, or environmental decoherence [16]. As a result, the key is never 100% accurate, and both parties must estimate the QBER value. This value is typically a few percent [17; 18], and its estimation can be performed by comparing a portion of the raw key over the public channel [19]. If the QBER exceeds an agreed-upon threshold, it may indicate an eavesdropping attempt or excessive channel noise, rendering the key distribution unreliable. The portion of the key used for comparison should be removed from the final key to minimize the potential information gained by an attacker. The length of this compared segment must be chosen carefully: if too short, QBER estimation may be inaccurate; if too long, a substantial number of bits would be discarded, significantly reducing the final key length.  
After QBER estimation, the next step is error correction. A popular solution is the parity check method, such as in BBPSS [20] or in the solution presented by [PERSON], et al. [21]. In this method, the key is divided into blocks and the parity of each block is compared through the public channel. Blocks with matching parities are kept in the key after discarding one bit (so the supposed attacker loses information about the parities of specific blocks). The length of the final key depends on the number of iterations-many iterations can significantly shorten the final key. To keep the final key length as close as possible to the initial received key length, a more efficient protocol such as Cascade [22] is necessary. Another error correction approach-first mentioned in [23]-uses ANNs with initial weights based on the bit strings transmitted and received over the quantum channel. This solution will be analyzed in this paper.  
The final stage of key distillation is privacy amplification. The most widely used method involves applying a one-way hash function that converts a string of bits intoa shorter key [24; 25]. Although the hash function is publicly known, its information is essentially useless to anyone other than the communicating parties, as it is extremely difficult (though not impossible [26]) to reverse a hash function. Other types of privacy amplification include privacy amplification by sampling [27] and privacy amplification by iteration [28], although these solutions are not widely adopted. The current research is increasingly focused on eliminating this phase. One example, mentioned previously, is key reconciliation using ANNs, which is secure enough to make privacy amplification unnecessary. However, even in this case, an additional phase can still be applied to enhance security.