Quantum key distribution exploits the transmissiondetection of single photons’ quantum states to generatedistribute secure keys, allowing absolutely secure communication. We use a self-developed miniature single-photon source, together with the single-photon wavepacket engineering, to implement a highly efficient protocol of differential-phase-shift quantum key distribution. Using the Ca