RESUMEN
Quantum key distribution (QKD) promises unconditional security for communication. However, the random choices of the measurement basis in QKD usually result in low key creation efficiency. This drawback is overcome in the differential-phase-shift QKD, provided that each photon can be prepared in a large number of time slots with a proper waveform. In this work we develop a miniature room-temperature 1550-nm single-photon source to generate narrowband single photon in 50 time slots with a nearly optimal waveform for achieving unity key creation efficiency. By utilizing these single photons in the field test, we demonstrate the differential-phase-shift QKD with a key creation efficiency of 97%. Our work shows that the practical QKD can benefit from the narrowband single photons with controllable waveforms.