Quantum cryptography, the principles of which are based on classical mechanics laws, solves exceptionally the issue of key distribution in classical cryptography. BB84, the first quantum key distribution created by Charles Bennett and Gilles Brassard in 1984 offers unconditional security and allows the transmission of a key with the length equal to the length of the message. According to Vernom, using the key with the above feature once together with an encryption algorithm leads to the formation of a most secure cryptographic system. The paper presents a method for improving the BB84 quantum protocol, using ten states of polarization, quantum memory and direct communication in both directions. The implementation of both the proposed method and the BB84 protocol was done through a C# application.