Quantum key distribution device with coherent states