  Quantum key distribution (QKD) can share an unconditional secure key between
two remote parties, but the deviation between theory and practice will break
the security of the generated key. In this paper, we evaluate the security of
QKD with weak basis-choice flaws, in which the random bits used by Alice and
Bob are weakly controlled by Eve. Based on the definition of Li \textit{et al.}
[Sci. Rep. 5, 16200 (2015)] and GLLP's analysis, we obtain a tight and
analytical bound to estimate the phase error and key rate for both the single
photon source and the weak coherent source. Our approach largely increases the
key rate from that of the original approach. Finally, we investigate and
confirm the security of BB84-QKD with a practical commercial devices.
