Quantum cryptography provides a secure way to exchange encryption keys. It uses principles of quantum mechanics like photon polarization and the uncertainty principle to detect eavesdropping. The most common protocol is BB84, where Alice encodes random bits in one of two polarization bases and sends photons to Bob. Bob measures in a random basis, and they test for errors to check for eavesdropping before using the key. Quantum key distribution exploits these effects to securely generate encryption keys known only to the communicating parties. The no-cloning theorem guarantees privacy by making unauthorized copying of quantum states impossible.