  We show that the Mayers-Shor-Preskill approach and Renner's approach to
proving the security of quantum key distribution (QKD) are essentially the
same. We begin our analysis by considering a special case of QKD called privacy
amplification (PA). PA itself is an important building block of cryptography,
both classical and quantum. The standard theoretical tool used for its security
proof is called the leftover hashing lemma (LHL). We present a direct
connection between the LHL and the coding theorem of a certain quantum error
correction code. Then we apply this result to proving the equivalence between
the two approaches to proving the security of QKD.
