How entanglement method used in quantum cryptography?