  Distributed-phase-reference quantum key distribution stands out for its easy
implementation with present day technology. Since many years, a full security
proof of these schemes in a realistic setting has been elusive. For the first
time, we solve this long standing problem and present a generic method to prove
the security of such protocols against general attacks. To illustrate our
result we provide lower bounds on the key generation rate of a variant of the
coherent-one-way quantum key distribution protocol. In contrast to standard
predictions, it appears to scale quadratically with the system transmittance.
