The first and best known quantum protocol BB84, whose security is unconditional allows the transmission of a key with a length equal to that of the message. This key used with an encryption algorithm leads to an unbreakable cryptographic scheme. Despite advantages the protocol still can be improved in at least two aspects: its efficiency which is of about 50%, only half of the photons transmitted are used to create the encryption key and the second aspect refers to the communication that takes place on the classic channel, as it must be reduced or even eliminated. The paper presents a method that improves the two aspects of the BB84 protocol by using quantum memory and eight states of polarization. The implementation of both the proposed method and the BB84 protocol was done through a C# application.
 C. H. Bennett, G. Brassard, "Quantum Cryptography: Public key distribution and coin tossing", International Conference on Computers, Systems & Signal Processing, Bangalore, India, 10-12 December 1984, pp. 175-179.
 P. Shor, "Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer", SIAM Journal of Computing, 26, 1997, pp. 1484-1509.
 A. K. Ekert, "Quantum cryptography based on Bell's theorem", Physical Review Letters, vol. 67, no. 6, 5 August 1991, pp. 661 - 663.
 C. H. Bennett, "Quantum cryptography using any two nonorthogonal states ", Phys. Rev. Lett. 68, 1992, pp. 3121-3124.
 H. Bechmann-Pasquinucci, N. Gisin, "Incoherent and coherent eavesdropping in the six-state protocol of quantum cryptography" Phys. Rev. A 59, 4238-4248, 1999.
 D. Enzer, P. Hadley, R. Gughes, C. Peterson, P. Kwiat, "Entangled-photon six-state quantum cryptography", New Journal of Physics, 2002, pp 45.1-45.8.
 A. Scarani, A. Acin, G. Ribordy, N. Gisin, "Quantum cryptography protocols robust against photon number splitting attacks.", Physical Review Letters, vol. 92, 2004.
 D. Mayers, “Unconditional security in quantum cryptography,” Journal of the ACM, vol. 48, no. 3, pp. 351–406, May 2001.