Generate two entangled photons, send one to a message sender and the other to the intended receiver. Both the sender and the receiver recover the same piece of quantum information from the photons, then the sender scrambles the message to be sent by some reversible function determined by the quantum information, and send this scrambled data to the receiver who is now capable of unscrambling it thanks to having the quantum information that was used for the scrambling procedure.
The main difference between quantum cryptography and quantum teleportation is the following :
- quantum teleportation aims at transmitting quantum information (i.e. a quantum state). Because of the no-cloning theorem, if the quality of this transmission is high enough, no-one except the legitimate receiver can reconstruct the quantum state, nor get any information about it.
- quantum cryptography aims$^*$ at transmitting classical information privately. One way to do it is to encode the information on a quantum state, and then send this state through teleportation. This method is not very practical theoretically, but as far as I know, the best security proofs we have on the security of quantum cryptography protocols can be decomposed as :
- This (technologically doable) set-up can be shown to be equivalent to a (much more difficult to build but easier to analyse) teleportation based set-up;
- The equivalent teleportation set-up works well enough to guarantee the privacy of the communication.
So the analogy between quantum teleportation and quantum cryptography is very deep, and not a mere coincidence.
$*$ I know that some quantum cryptography protocols have other aims than privacy. But I don't think it's the subject of this question.