he BB84 protocol, named after its inventors C. H. Bennet and G. Brassard, and the year of publication, 1984. The description made in the previous section is essentially that of the BB84 protocol. Here, it just needs to be formalized further and generalized to any key sizes. Note that the role of Alice and Bob can be interchanged, each one being capable of generating a QKD session, which is also a potential means for authentication and other security tests. Alice uses a random-bit generator to produce two sequences A = (a1, A2, ...) and B = (b1, b2, ), each of N = (4 + A) n bits length, with A being a small integer number playing the role of a reserve, and 2n being the desired key length (the explanation for the factor of two comes later). Then she produces an N-qubit block sequence 1/s/, which can be expressed in the form: (25.24) For each cbit pair ak, bk the corresponding single qubit Varbk) is generated according to the following (possible) convention: 1/201) = l+) (25.25) 1/10/=||) 1/11/=1-). We observe that the random value of the bit bk determines the choice of either state, |0), |+) (or I, n with polarized photons) to represent ak = 0, and the same with |1), |-) (or <>, U with polarized photons) to represent ak = 1. We may also state that bk = 0 encodes the ak bit in the quantum basis Z, and bk = 1 encodes the ak bit in the quantum basis X. This generalizes the description made in the previous section. The N-qubit block 1/>/ is then input to the quantum communication channel by Alice, and Bob receives the state Such a formulation recalls that the channel is characterized by a quantum operation E, which includes any effects such as quantum noise and Eve's wiretapping. 25.10 The BB84 protocol for QKD At his end, Bob uses a random-bit generator to produce a sequence B' = (b', b'2 of N = (4 + A) n bits length. This is the random sequence he uses to determine the choice of measurement basis, X or Z, for each of the received qubit. For instance, Bob can choose conventionally that if b' = 0, the measurement basis